/*
Theme Name: Zurinah Literary Journal
Theme URI: https://zurinah.kualihitam.com/
Author: Kuali Hitam
Author URI: https://kualihitam.com/
Description: A bilingual classic WordPress blogging theme for Dato' Dr Zurinah Hassan, designed as a modern literary journal and research-facing archive.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
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: zurinah-journal
Tags: blog, news, education, two-columns, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, wide-blocks
*/

:root {
  --zj-ink: #17342f;
  --zj-deep: #244940;
  --zj-paper: #f3eee4;
  --zj-white: #fffdf8;
  --zj-clay: #a84837;
  --zj-gold: #d7a842;
  --zj-moss: #74866d;
  --zj-text: #26322f;
  --zj-muted: #65716d;
  --zj-line: #d9d1c3;
  --zj-display: "Libre Caslon Display", Georgia, serif;
  --zj-body: "DM Sans", Arial, sans-serif;
  --zj-shadow: 0 18px 55px rgba(23, 52, 47, .10);
  --zj-radius: 4px;
  --zj-wide: 1180px;
  --zj-reading: 760px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--zj-text);
  background: var(--zj-white);
  font-family: var(--zj-body);
  font-size: 17px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: var(--zj-clay); text-decoration-thickness: .08em; text-underline-offset: .16em; }
a:hover, a:focus { color: var(--zj-ink); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .55em;
  color: var(--zj-ink);
  font-family: var(--zj-display);
  font-weight: 400;
  line-height: 1.08;
}
h1 { font-size: clamp(2.8rem, 7vw, 5.2rem); }
h2 { font-size: clamp(2.1rem, 4vw, 3.25rem); }
h3 { font-size: clamp(1.35rem, 2vw, 1.75rem); }
p { margin: 0 0 1.35em; }
blockquote {
  margin: 2.2rem 0;
  padding: .6rem 0 .6rem 1.6rem;
  border-left: 4px solid var(--zj-gold);
  color: var(--zj-ink);
  font-family: var(--zj-display);
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  line-height: 1.35;
}
hr { border: 0; border-top: 1px solid var(--zj-line); margin: 2.5rem 0; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus, .skip-link:focus {
  position: fixed !important; z-index: 100000; top: 12px; left: 12px;
  width: auto; height: auto; padding: .8rem 1rem; margin: 0;
  clip: auto; overflow: visible; color: #fff; background: var(--zj-clay);
}
:focus-visible { outline: 3px solid var(--zj-gold); outline-offset: 3px; }
.zj-wrap { width: min(calc(100% - 48px), var(--zj-wide)); margin-inline: auto; }
.zj-reading-width { width: min(calc(100% - 48px), var(--zj-reading)); margin-inline: auto; }
.zj-section { padding: clamp(4rem, 8vw, 6.5rem) 0; }
.zj-section--paper { background: var(--zj-paper); }
.zj-section--dark { color: #d7e0dc; background: var(--zj-ink); }
.zj-section--dark h1, .zj-section--dark h2, .zj-section--dark h3 { color: #fff; }
.zj-overline {
  display: block; margin-bottom: 1rem; color: var(--zj-clay);
  font-size: .75rem; font-weight: 700; letter-spacing: .16em; line-height: 1.25; text-transform: uppercase;
}
.zj-section--dark .zj-overline { color: var(--zj-gold); }
.zj-button, .wp-block-button__link, .search-submit {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 46px; padding: .75rem 1.35rem; border: 1px solid var(--zj-clay); border-radius: 2px;
  color: #fff; background: var(--zj-clay); font-size: .78rem; font-weight: 700;
  letter-spacing: .06em; line-height: 1.1; text-decoration: none; text-transform: uppercase;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.zj-button:hover, .zj-button:focus, .wp-block-button__link:hover, .search-submit:hover {
  color: #fff; background: var(--zj-ink); border-color: var(--zj-ink); transform: translateY(-2px);
}
.zj-button--gold { color: var(--zj-ink); background: var(--zj-gold); border-color: var(--zj-gold); }
.zj-button--ghost { color: var(--zj-ink); background: transparent; border-color: var(--zj-line); }

/* Header */
.site-header { position: relative; z-index: 100; background: rgba(243, 238, 228, .97); border-bottom: 1px solid var(--zj-line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 88px; gap: 2rem; }
.site-branding { display: flex; align-items: center; flex: 0 0 auto; gap: .85rem; }
.custom-logo-link img { width: auto; max-height: 54px; }
.site-monogram {
  display: grid; place-items: center; width: 48px; height: 48px; color: var(--zj-paper);
  background: var(--zj-ink); font-family: var(--zj-display); font-size: 1.2rem; text-decoration: none;
}
.site-title { display: block; color: var(--zj-ink); font-family: var(--zj-display); font-size: 1.45rem; line-height: 1; text-decoration: none; }
.site-description { display: block; margin-top: .4rem; color: var(--zj-muted); font-size: .66rem; font-weight: 700; letter-spacing: .12em; line-height: 1; text-transform: uppercase; }
.site-navigation { display: flex; align-items: center; gap: 1rem; }
.primary-menu, .primary-menu ul { margin: 0; padding: 0; list-style: none; }
.primary-menu { display: flex; align-items: center; flex-wrap: wrap; gap: .1rem; }
.primary-menu li { position: relative; }
.primary-menu a { display: block; padding: .7rem .68rem; color: var(--zj-ink); font-size: .76rem; font-weight: 700; letter-spacing: .035em; text-decoration: none; text-transform: uppercase; }
.primary-menu a:hover, .primary-menu a:focus, .primary-menu .current-menu-item > a, .primary-menu .current_page_item > a { color: var(--zj-clay); }
.primary-menu .sub-menu {
  position: absolute; top: 100%; left: 0; z-index: 10; display: none; min-width: 220px;
  padding: .55rem; background: var(--zj-white); border: 1px solid var(--zj-line); box-shadow: var(--zj-shadow);
}
.primary-menu li:hover > .sub-menu, .primary-menu li:focus-within > .sub-menu { display: block; }
.site-tools { display: flex; align-items: center; gap: .65rem; }
.language-switcher { display: flex; align-items: center; gap: .35rem; }
.language-switcher a, .language-switcher span {
  padding: .35rem .5rem; color: var(--zj-ink); font-size: .69rem; font-weight: 700; text-decoration: none; text-transform: uppercase;
}
.language-switcher .is-current { color: #fff; background: var(--zj-clay); }
.menu-toggle { display: none; width: 46px; height: 46px; padding: 0; border: 1px solid var(--zj-line); color: var(--zj-ink); background: transparent; }
.menu-toggle span, .menu-toggle::before, .menu-toggle::after { display: block; width: 20px; height: 2px; margin: 5px auto; background: currentColor; content: ""; }

/* Blog masthead */
.journal-hero { overflow: hidden; padding: clamp(5.5rem, 11vw, 9rem) 0; color: #dce7e2; background: var(--zj-ink); }
.journal-hero__grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, .7fr); align-items: center; gap: clamp(2rem, 7vw, 6rem); }
.journal-hero h1 { max-width: 900px; color: #fff; }
.journal-hero__intro { max-width: 760px; font-size: clamp(1.05rem, 2vw, 1.3rem); }
.journal-edition { padding: 2rem; color: var(--zj-ink); background: var(--zj-gold); box-shadow: 18px 18px 0 var(--zj-deep); }
.journal-edition strong { display: block; margin-bottom: .65rem; font-family: var(--zj-display); font-size: 1.8rem; font-weight: 400; }
.category-ribbon { padding: 1.25rem 0; background: var(--zj-paper); border-bottom: 1px solid var(--zj-line); }
.category-ribbon__inner { display: flex; align-items: center; gap: .7rem; overflow-x: auto; scrollbar-width: thin; }
.category-ribbon a { flex: 0 0 auto; padding: .5rem .85rem; border: 1px solid #b8ae9e; border-radius: 999px; color: var(--zj-ink); font-size: .72rem; font-weight: 700; text-decoration: none; text-transform: uppercase; }
.category-ribbon a:hover { color: #fff; background: var(--zj-ink); border-color: var(--zj-ink); }

/* Featured article */
.featured-story { padding: clamp(4rem, 8vw, 6.5rem) 0; background: var(--zj-white); }
.featured-story__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); align-items: stretch; gap: 0; box-shadow: var(--zj-shadow); }
.featured-story__image { min-height: 520px; background: linear-gradient(135deg, var(--zj-deep), var(--zj-moss)); }
.featured-story__image img { width: 100%; height: 100%; object-fit: cover; }
.featured-story__content { display: flex; flex-direction: column; justify-content: center; padding: clamp(2rem, 5vw, 4.5rem); background: var(--zj-paper); }
.featured-story__content h2 { font-size: clamp(2.3rem, 5vw, 4.1rem); }

/* Cards and archives */
.archive-header { padding: clamp(4.5rem, 9vw, 7.5rem) 0; color: #d7e0dc; background: var(--zj-ink); }
.archive-header h1 { color: #fff; }
.archive-description { max-width: 780px; font-size: 1.1rem; }
.archive-description p:last-child { margin-bottom: 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 2.3rem; }
.section-heading p { max-width: 520px; margin: 0; color: var(--zj-muted); }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.7rem; }
.post-card { display: flex; min-width: 0; flex-direction: column; overflow: hidden; background: var(--zj-white); border: 1px solid var(--zj-line); border-radius: var(--zj-radius); box-shadow: 0 8px 28px rgba(23, 52, 47, .06); transition: transform .25s ease, box-shadow .25s ease; }
.post-card:hover { transform: translateY(-5px); box-shadow: var(--zj-shadow); }
.post-card__image { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: linear-gradient(135deg, var(--zj-deep), var(--zj-moss)); }
.post-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.post-card:hover .post-card__image img { transform: scale(1.035); }
.post-card__body { display: flex; flex: 1; flex-direction: column; padding: 1.45rem; }
.post-card__body h2, .post-card__body h3 { font-size: 1.65rem; }
.post-card__body h2 a, .post-card__body h3 a { color: inherit; text-decoration: none; }
.post-card__excerpt { color: var(--zj-muted); font-size: .94rem; }
.post-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--zj-line); }
.post-card__read { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-decoration: none; text-transform: uppercase; }
.entry-meta { display: flex; flex-wrap: wrap; gap: .35rem 1rem; color: var(--zj-muted); font-size: .75rem; font-weight: 600; }
.entry-meta a { color: inherit; text-decoration: none; }
.entry-categories { margin-bottom: .75rem; }
.entry-categories a { color: var(--zj-clay); font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-decoration: none; text-transform: uppercase; }

/* Single post */
.single-hero { padding: clamp(5rem, 10vw, 8rem) 0; color: #d7e0dc; background: var(--zj-ink); }
.single-hero__inner { width: min(calc(100% - 48px), 980px); margin-inline: auto; }
.single-hero h1 { color: #fff; }
.single-hero .entry-meta, .single-hero .entry-meta a { color: #d7e0dc; }
.single-excerpt { max-width: 820px; margin-top: 1.5rem; font-size: clamp(1.05rem, 2vw, 1.28rem); }
.single-featured { padding: 2rem 0; background: var(--zj-paper); }
.single-featured img { width: 100%; max-height: 720px; object-fit: cover; }
.single-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; align-items: start; gap: clamp(2.5rem, 7vw, 5.5rem); }
.entry-content { min-width: 0; font-size: 1.08rem; }
.entry-content > * { max-width: 100%; }
.entry-content > .alignwide { width: min(1100px, 100vw - 48px); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.entry-content > .alignfull { width: 100vw; max-width: none; margin-left: 50%; transform: translateX(-50%); }
.entry-content h2, .entry-content h3, .entry-content h4 { margin-top: 1.7em; }
.entry-content figcaption { margin-top: .55rem; color: var(--zj-muted); font-size: .8rem; text-align: center; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: .75rem; border: 1px solid var(--zj-line); text-align: left; }
.entry-content code { padding: .15em .35em; background: var(--zj-paper); }
.entry-content pre { overflow: auto; padding: 1rem; color: #fff; background: var(--zj-ink); }
.post-sidebar { position: sticky; top: 2rem; }
.sidebar-panel { margin-bottom: 1.5rem; padding: 1.35rem; background: var(--zj-paper); border: 1px solid var(--zj-line); }
.sidebar-panel h2 { font-size: 1.3rem; }
.share-links { display: grid; gap: .55rem; }
.share-links a { display: block; padding: .55rem .7rem; border: 1px solid var(--zj-line); color: var(--zj-ink); font-size: .72rem; font-weight: 700; text-decoration: none; text-transform: uppercase; }
.author-box { display: grid; grid-template-columns: 88px 1fr; gap: 1.2rem; margin-top: 3rem; padding: 1.6rem; background: var(--zj-paper); border: 1px solid var(--zj-line); }
.author-box img { border-radius: 50%; }
.author-box h2 { margin-bottom: .35rem; font-size: 1.45rem; }
.entry-tags { margin-top: 2rem; }
.entry-tags a { display: inline-block; margin: .2rem; padding: .35rem .65rem; border: 1px solid var(--zj-line); color: var(--zj-ink); font-size: .72rem; text-decoration: none; }
.post-navigation { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--zj-line); }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.post-navigation .nav-next { text-align: right; }
.post-navigation a { color: var(--zj-ink); text-decoration: none; }
.post-navigation .nav-subtitle { display: block; color: var(--zj-clay); font-size: .7rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.post-navigation .nav-title { font-family: var(--zj-display); font-size: 1.2rem; }

/* Pages, search and utility */
.page-hero { padding: clamp(4.5rem, 8vw, 7rem) 0; background: var(--zj-paper); border-bottom: 1px solid var(--zj-line); }
.page-content { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.search-form { display: flex; width: 100%; max-width: 620px; gap: .6rem; }
.search-field { min-width: 0; flex: 1; min-height: 48px; padding: .7rem 1rem; border: 1px solid var(--zj-line); color: var(--zj-ink); background: #fff; }
.not-found { padding: 4rem 0; text-align: center; }
.not-found .search-form { margin: 2rem auto 0; }
.pagination { margin-top: 3rem; }
.pagination .nav-links { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .45rem; }
.pagination a, .pagination span { display: grid; place-items: center; min-width: 42px; min-height: 42px; padding: .3rem .65rem; border: 1px solid var(--zj-line); color: var(--zj-ink); text-decoration: none; }
.pagination .current { color: #fff; background: var(--zj-clay); border-color: var(--zj-clay); }
.widget { margin-bottom: 1.7rem; }
.widget-title { font-size: 1.35rem; }
.widget ul { margin: 0; padding: 0; list-style: none; }
.widget li { padding: .45rem 0; border-bottom: 1px solid rgba(217, 209, 195, .35); }

/* Comments */
.comments-area { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--zj-line); }
.comment-list { margin: 0; padding: 0; list-style: none; }
.comment-list .children { list-style: none; }
.comment-body { margin-bottom: 1.5rem; padding: 1.25rem; background: var(--zj-paper); }
.comment-meta { margin-bottom: .8rem; font-size: .8rem; }
.comment-form label { display: block; margin-bottom: .35rem; font-size: .8rem; font-weight: 700; }
.comment-form input:not([type="checkbox"]), .comment-form textarea { width: 100%; padding: .75rem; border: 1px solid var(--zj-line); background: #fff; }
.form-submit .submit { padding: .75rem 1.2rem; border: 0; color: #fff; background: var(--zj-clay); font-weight: 700; }

/* Footer */
.site-footer { padding: 4.5rem 0 1.5rem; color: #cbd8d2; background: var(--zj-ink); }
.site-footer h2, .site-footer h3 { color: #fff; }
.site-footer a { color: #dbe5e1; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .7fr .7fr; gap: 3rem; }
.footer-brand p { max-width: 500px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 2rem; margin-top: 3rem; padding-top: 1.3rem; border-top: 1px solid #49665d; color: #aebfb8; font-size: .75rem; }
.footer-menu { margin: 0; padding: 0; list-style: none; }
.footer-menu li { margin-bottom: .45rem; }

/* WordPress core */
.alignleft { float: left; margin: .4rem 1.5rem 1rem 0; }
.alignright { float: right; margin: .4rem 0 1rem 1.5rem; }
.aligncenter { display: block; margin-right: auto; margin-left: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text, .gallery-caption { color: var(--zj-muted); font-size: .8rem; }
.sticky { position: relative; }
.sticky::before { position: absolute; z-index: 2; top: .8rem; left: .8rem; padding: .25rem .5rem; color: var(--zj-ink); background: var(--zj-gold); content: "Featured"; font-size: .65rem; font-weight: 700; text-transform: uppercase; }
.bypostauthor { outline: 1px solid var(--zj-gold); }

@media (max-width: 1040px) {
  .menu-toggle { display: block; }
  .site-navigation { position: fixed; inset: 88px 0 0; display: none; align-items: stretch; flex-direction: column; padding: 1.5rem 24px; overflow: auto; background: var(--zj-paper); }
  .site-navigation.is-open { display: flex; }
  .primary-menu { align-items: stretch; flex-direction: column; width: 100%; }
  .primary-menu a { padding: .9rem 0; border-bottom: 1px solid var(--zj-line); }
  .primary-menu .sub-menu { position: static; display: block; padding: 0 0 0 1rem; background: transparent; border: 0; box-shadow: none; }
  .site-tools { justify-content: space-between; width: 100%; }
  .journal-hero__grid, .featured-story__grid { grid-template-columns: 1fr; }
  .featured-story__image { min-height: 420px; }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .single-layout { grid-template-columns: 1fr; }
  .post-sidebar { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
}

@media (max-width: 680px) {
  .zj-wrap, .zj-reading-width, .single-hero__inner { width: min(calc(100% - 32px), var(--zj-wide)); }
  .site-header__inner { min-height: 76px; }
  .site-navigation { inset: 76px 0 0; }
  .site-description { display: none; }
  .post-grid, .post-sidebar, .footer-grid { grid-template-columns: 1fr; }
  .featured-story__image { min-height: 300px; }
  .section-heading, .footer-bottom { align-items: flex-start; flex-direction: column; }
  .single-layout { gap: 2.3rem; }
  .author-box { grid-template-columns: 64px 1fr; }
  .post-navigation .nav-links { grid-template-columns: 1fr; }
  .post-navigation .nav-next { text-align: left; }
  .search-form { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
