/*
Theme Name: Mitaku Inspired
Theme URI: https://mitaku.net/
Author: OpenAI
Description: A clean, image-focused dark WordPress gallery theme.
Version: 2.1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: mitaku-inspired
License: GPL-2.0-or-later
*/

:root {
  --background: #101216;
  --surface: #191d23;
  --surface-raised: #20252c;
  --border: #303842;
  --text: #f2f5f7;
  --muted: #a9b4bd;
  --accent: #34a8d8;
  --accent-soft: #17394a;
  --container: 1280px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--text); font: 16px/1.6 Arial, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img { max-width: 100%; height: auto; }
.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 { width: auto; height: auto; clip: auto; margin: 0; padding: 10px; top: 10px; left: 10px; z-index: 1000; background: #fff; color: #111; }
.inner-wrap { width: min(100%, var(--container)); margin-inline: auto; padding-inline: 24px; }
.site { min-height: 100vh; }

/* One-row header */
.site-header { background: #15191e; border-bottom: 1px solid #282e36; }
.header-inner { position: relative; min-height: 88px; display: flex; align-items: center; gap: 32px; }
.brand-identity { flex: 0 0 auto; min-width: 0; }
.site-title { margin: 0; font-size: 32px; font-weight: 800; line-height: 1.1; letter-spacing: -.045em; }
.site-title a { color: var(--accent); }
.site-description { margin: 3px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.custom-logo { display: block; max-width: 240px; max-height: 62px; width: auto; height: auto; }
.nav-menu-wrap { flex: 1; min-width: 0; }
.nav-menu, .nav-menu .sub-menu { list-style: none; margin: 0; padding: 0; }
.nav-menu { display: flex; justify-content: flex-end; align-items: center; gap: 4px; }
.nav-menu li { position: relative; }
.nav-menu > li > a { display: block; padding: 11px 14px; border-radius: 6px; color: #d9e0e6; font-size: 13px; font-weight: 700; letter-spacing: .055em; text-transform: uppercase; }
.nav-menu > li > a:hover, .nav-menu > li.current-menu-item > a, .nav-menu > li.current-menu-ancestor > a { color: #fff; background: var(--surface-raised); }
.nav-menu .sub-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 190px; z-index: 20; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: 0 16px 35px #0008; }
.nav-menu li:hover > .sub-menu, .nav-menu li:focus-within > .sub-menu { display: block; }
.nav-menu .sub-menu a { display: block; padding: 8px 10px; border-radius: 4px; font-size: 14px; }
.nav-menu .sub-menu a:hover { background: var(--surface-raised); }
.nav-search { position: relative; flex: 0 0 auto; }
.nav-search-toggle, .menu-toggle { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--text); }
.nav-search-toggle:hover, .menu-toggle:hover { border-color: var(--accent); color: var(--accent); }
.menu-toggle { display: none; }
.nav-search-panel { display: none; position: absolute; top: calc(100% + 11px); right: 0; width: min(330px, 90vw); padding: 12px; z-index: 30; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: 0 16px 35px #0009; }
.nav-search.is-open .nav-search-panel { display: block; }
.search-form { display: flex; width: 100%; }
.search-form label { min-width: 0; flex: 1; }
.search-field { width: 100%; height: 42px; padding: 9px 12px; border: 1px solid #46515d; border-radius: 5px 0 0 5px; outline: 0; background: #111419; color: var(--text); font-size: 14px; }
.search-submit { min-width: 43px; height: 42px; border: 0; border-radius: 0 5px 5px 0; background: var(--accent); color: #08171d; font-weight: 700; }

/* Gallery listings */
.site-main { min-height: calc(100vh - 170px); }
.content-shell { padding-top: 42px; padding-bottom: 74px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 0 0 26px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.section-kicker { display: block; margin-bottom: 5px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.section-heading h1, .section-heading h2 { margin: 0; font-size: clamp(27px, 3vw, 37px); font-weight: 800; line-height: 1.15; letter-spacing: -.035em; }
.archive-description { margin: -4px 0 24px; color: var(--muted); }
.archive-description p { margin: 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; align-items: stretch; }
.gallery-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); box-shadow: 0 9px 24px #0003; transition: transform .2s, border-color .2s, box-shadow .2s; }
.gallery-card:hover { transform: translateY(-4px); border-color: #4b8ca8; box-shadow: 0 15px 30px #0006; }
.gallery-card-image { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: #23282e; }
.gallery-card-image img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform .35s; }
.gallery-card:hover .gallery-card-image img { transform: scale(1.025); }
.gallery-card-content { flex: 1; padding: 18px 19px 20px; }
.gallery-card:not(.has-post-thumbnail) .gallery-card-content { min-height: 160px; }
.category-links { display: flex; flex-wrap: wrap; gap: 6px; }
.category-links a { display: inline-block; padding: 3px 8px; border: 1px solid #32738f; border-radius: 4px; background: var(--accent-soft); color: #b6eaff; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.category-links a:hover { background: var(--accent); color: #071820; }
.gallery-card-title { margin: 7px 0 8px; font-size: 20px; font-weight: 750; line-height: 1.35; letter-spacing: -.02em; overflow-wrap: anywhere; }
.gallery-card-title:first-child { margin-top: 0; }
.gallery-card-title a:hover { color: var(--accent); }
.entry-meta { color: var(--muted); font-size: 13px; }
.post-views-count { white-space: nowrap; }
.views-icon { display: inline-block; margin-right: 3px; vertical-align: -3px; color: var(--accent); }

/* Compact view-based recommendations */
.popular-section { margin-top: 72px; }
.popular-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.popular-item { display: flex; align-items: center; gap: 15px; min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.popular-thumb { flex: 0 0 84px; width: 84px; height: 84px; overflow: hidden; border-radius: 5px; background: #252b32; }
.popular-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.popular-item h3 { margin: 0 0 6px; font-size: 16px; line-height: 1.35; }

/* Pagination */
.pagination { margin-top: 35px; }
.pagination .nav-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.page-numbers { min-width: 40px; height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 0 13px; border: 1px solid #68747f; border-radius: 3px; color: #bac4cc; background: #111419; font-size: 14px; }
.page-numbers.current, .page-numbers:hover { border-color: #85bae0; color: #fff; background: #2379b9; }
.page-numbers.current { font-weight: 700; }

/* Article and page content */
.article-shell { max-width: 948px; padding-top: 48px; padding-bottom: 76px; }
.single-article, .page-article { padding: 36px 42px 42px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.entry-title { margin: 10px 0 9px; font-size: clamp(30px, 4vw, 43px); line-height: 1.16; letter-spacing: -.035em; overflow-wrap: anywhere; }
.single-hero-image { display: flex; justify-content: center; margin: 28px 0 0; padding: 16px; border-radius: 7px; background: #111419; }
.single-hero-image img { display: block; width: auto; max-width: 100%; max-height: 82vh; height: auto; border-radius: 4px; object-fit: contain; }
.entry-content { margin-top: 28px; color: #d6dce1; font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; }
.entry-content p { margin: 0 0 1.25em; }
.entry-content h2, .entry-content h3, .entry-content h4 { color: #fff; line-height: 1.3; }
.entry-content img { max-width: 100%; height: auto; border-radius: 5px; }
.entry-content iframe, .entry-content figure { max-width: 100%; }
.entry-content a { color: var(--accent); text-decoration: underline; }
.entry-content blockquote { margin: 24px 0; padding: 10px 20px; border-left: 3px solid var(--accent); background: #22282f; }
.post-tags { margin-top: 28px; }
.post-tags a { display: inline-block; margin: 3px; padding: 4px 9px; border: 1px solid var(--border); border-radius: 4px; color: var(--muted); font-size: 13px; }
.post-tags a:hover { color: var(--accent); }
.post-navigation { margin-top: 22px; }
.post-navigation-inner { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.post-nav-card { display: flex; flex-direction: column; justify-content: center; gap: 7px; min-height: 106px; padding: 19px 22px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); transition: border-color .2s, transform .2s; }
.post-nav-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.post-nav-card--next { align-items: flex-end; text-align: right; }
.post-nav-label { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.post-nav-title { color: var(--text); font-size: 17px; line-height: 1.35; overflow-wrap: anywhere; }
.empty-state { max-width: 760px; padding: 36px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.empty-state h1, .empty-state h2 { margin-top: 0; }
.empty-state p { color: var(--muted); }
.empty-state .search-form { max-width: 440px; }

/* Footer */
.site-footer { border-top: 1px solid #2a3037; background: #15191e; }
.footer-inner { min-height: 104px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-brand { display: flex; flex-direction: column; gap: 3px; }
.footer-brand strong { color: var(--accent); font-size: 17px; }
.footer-brand span { color: var(--muted); font-size: 12px; }
.footer-menu { display: flex; flex-wrap: wrap; gap: 18px; list-style: none; margin: 0; padding: 0; font-size: 13px; }
.footer-menu a { color: var(--muted); }
.back-to-top { position: fixed; right: 22px; bottom: 22px; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #72bee0; border-radius: 7px; background: var(--accent); color: #071820; font-size: 22px; font-weight: 700; box-shadow: 0 8px 24px #0006; }
.back-to-top:hover { color: #071820; background: #62c8f0; }

@media (max-width: 1000px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .popular-grid { grid-template-columns: 1fr; }
  .header-inner { gap: 16px; }
}
@media (max-width: 700px) {
  .inner-wrap { padding-inline: 16px; }
  .header-inner { min-height: 72px; }
  .site-title { font-size: 27px; }
  .menu-toggle { display: grid; margin-left: auto; }
  .nav-menu-wrap { display: none; position: absolute; top: 100%; left: 16px; right: 16px; z-index: 25; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: 0 15px 30px #0009; }
  .nav-menu-wrap.is-open { display: block; }
  .nav-menu { display: block; }
  .nav-menu > li > a { padding: 10px; }
  .nav-menu .sub-menu { display: block; position: static; box-shadow: none; padding-left: 12px; border: 0; }
  .content-shell { padding-top: 28px; padding-bottom: 48px; }
  .article-shell { padding-top: 28px; padding-bottom: 48px; }
  .single-article, .page-article { padding: 24px; }
}
@media (max-width: 600px) {
  .gallery-grid { grid-template-columns: 1fr; gap: 20px; }
  .section-heading { margin-bottom: 20px; }
  .gallery-card-image { aspect-ratio: 4 / 5; }
  .single-article, .page-article { padding: 20px 16px; }
  .post-navigation-inner { grid-template-columns: 1fr; }
  .post-nav-spacer { display: none; }
  .post-nav-card--next { align-items: flex-start; text-align: left; }
  .footer-inner { align-items: flex-start; flex-direction: column; padding-block: 25px; }
  .back-to-top { right: 14px; bottom: 14px; }
}
