/*
Theme Name: AIWireX ART
Theme URI: https://aiwirex.com
Author: ACWirex
Description: Dark editorial AI art gallery. Cards with image + visible text. Clean, readable, responsive.
Version: 3.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: aiwirex-art
Tags: dark, art, gallery, two-columns, custom-menu, featured-images
*/

/* ══════════════════════════
   RESET & VARIABLES
══════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0f0e0d;
  --bg2:       #141312;
  --card:      #1a1917;
  --card2:     #1f1e1b;
  --border:    rgba(255,255,255,0.07);
  --border2:   rgba(255,255,255,0.13);
  --txt:       #e8e4dc;
  --txt2:      #8a8680;
  --txt3:      #5a5652;
  --accent:    #c9a96e;
  --accent2:   #8a6a3a;
  --accent-rgb:201,169,110;
  --serif:     'Cormorant Garamond', Georgia, serif;
  --sans:      'Outfit', system-ui, sans-serif;
  --r:         10px;
  --r-sm:      6px;
  --max:       1160px;
  --side:      280px;
  --gap:       20px;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--txt);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.65;
  cursor: none;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; cursor: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font-family: var(--sans); cursor: none; }

/* ══════════════════════════
   CUSTOM CURSOR
══════════════════════════ */
#cur-dot {
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%,-50%);
  transition: transform .12s ease, opacity .2s;
  will-change: transform;
}
#cur-ring {
  width: 34px; height: 34px;
  border: 1px solid rgba(var(--accent-rgb),.4);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9998;
  transform: translate(-50%,-50%);
  transition: width .2s ease, height .2s ease, border-color .2s ease;
  will-change: transform;
}
body.c-hover #cur-ring { width: 54px; height: 54px; border-color: rgba(var(--accent-rgb),.85); }
body.c-hover #cur-dot  { transform: translate(-50%,-50%) scale(0); }
@media (hover: none) {
  #cur-dot, #cur-ring { display: none; }
  body, a, button { cursor: auto; }
}

/* ══════════════════════════
   LAYOUT
══════════════════════════ */
.container { max-width: var(--max); margin: 0 auto; padding: 0 28px; }

/* ══════════════════════════
   HEADER
══════════════════════════ */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(15,14,13,.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 0.5px solid var(--border);
  height: 62px;
}
.nav-inner {
  max-width: var(--max); margin: 0 auto;
  padding: 0 28px; height: 62px;
  display: flex; align-items: center; justify-content: space-between;
}
.site-logo {
  font-family: var(--serif);
  font-size: 20px; font-weight: 300;
  letter-spacing: .12em; color: var(--txt);
}
.site-logo em { font-style: italic; color: var(--accent); }
.site-logo sub {
  font-family: var(--sans);
  font-size: 10px; letter-spacing: .22em;
  opacity: .45; vertical-align: middle;
  margin-left: 5px; font-style: normal;
}
.nav-links {
  display: flex; align-items: center;
  gap: 30px; list-style: none;
  font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--txt2);
}
.nav-links a:hover { color: var(--txt); }
.nav-cta {
  padding: 7px 18px;
  border: 0.5px solid rgba(var(--accent-rgb),.4);
  border-radius: 20px;
  color: var(--accent) !important;
  transition: all .2s;
}
.nav-cta:hover { background: var(--accent) !important; color: var(--bg) !important; }

.hamburger {
  display: none; flex-direction: column;
  gap: 5px; background: none; border: none; padding: 4px;
}
.hamburger span { display: block; width: 21px; height: 1.5px; background: var(--txt2); transition: all .2s; }

/* ══════════════════════════
   HERO — FEATURED (full width)
══════════════════════════ */
.hero-wrap { position: relative; width: 100%; overflow: hidden; }
.hero-inner {
  position: relative;
  width: 100%; height: 72vh; min-height: 420px;
  display: block; overflow: hidden;
}
.hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  transition: transform .6s ease;
}
.hero-inner:hover .hero-img { transform: scale(1.03); }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to top,
    rgba(15,14,13,.95) 0%,
    rgba(15,14,13,.35) 50%,
    rgba(15,14,13,.05) 100%
  );
}
.hero-body {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 40px 44px;
  transform: translateY(4px);
  transition: transform .35s ease;
}
.hero-inner:hover .hero-body { transform: translateY(0); }
.hero-badge {
  display: inline-block;
  font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  border: 0.5px solid rgba(var(--accent-rgb),.35);
  padding: 4px 12px; border-radius: 20px;
  margin-bottom: 12px;
}
.hero-title {
  font-family: var(--serif);
  font-size: clamp(26px, 3.5vw, 50px);
  font-weight: 300; color: #fff;
  line-height: 1.18; max-width: 680px;
  margin-bottom: 12px;
}
.hero-meta { font-size: 12px; color: rgba(255,255,255,.4); }

/* ══════════════════════════
   MAIN CONTENT + SIDEBAR
══════════════════════════ */
.main-wrap {
  max-width: var(--max); margin: 0 auto;
  padding: 36px 28px 72px;
  display: grid;
  grid-template-columns: 1fr var(--side);
  gap: 40px;
  align-items: start;
}

/* ══════════════════════════
   SECTION LABEL
══════════════════════════ */
.sec-label {
  display: flex; align-items: center; gap: 14px;
  font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--txt3);
  margin-bottom: 22px;
}
.sec-label::after { content: ''; flex: 1; height: .5px; background: var(--border); }

/* ══════════════════════════
   ARTICLE GRID — 2 columns
══════════════════════════ */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  margin-bottom: 36px;
}

/* ── CARD ── */
.art-card {
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  display: block;
  transition: border-color .2s, transform .22s ease, box-shadow .22s ease;
}
.art-card:hover {
  border-color: var(--border2);
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(0,0,0,.45);
}

/* Image container — fixed 16:9, images never distorted */
.art-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--card2);
}
.art-thumb-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform .45s ease;
  display: block;
}
.art-card:hover .art-thumb-img { transform: scale(1.05); }
.art-thumb-cat {
  position: absolute; top: 11px; left: 11px;
  font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent);
  background: rgba(15,14,13,.7);
  padding: 3px 10px; border-radius: 20px;
}

/* Text area — always visible */
.art-info {
  padding: 16px 18px 20px;
  background: var(--card);
}
.art-title {
  font-family: var(--serif);
  font-size: 18px; font-weight: 400;
  color: var(--txt); line-height: 1.3;
  margin-bottom: 8px;
}
.art-meta { font-size: 12px; color: var(--txt3); }

/* ══════════════════════════
   PAGINATION
══════════════════════════ */
.pagination {
  display: flex; align-items: center;
  justify-content: center; gap: 6px;
  padding: 24px 0 0;
  border-top: 0.5px solid var(--border);
}
.page-numbers {
  min-width: 36px; height: 36px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  border: 0.5px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--txt2);
  transition: all .15s;
}
.page-numbers:hover { border-color: var(--border2); color: var(--txt); }
.page-numbers.current { border-color: var(--accent2); color: var(--accent); }
.page-numbers.prev, .page-numbers.next { font-size: 16px; color: var(--txt3); }
/* Fix WordPress wrapping pagination in <ul> */
.pagination ul { display: contents; list-style: none; }
.pagination ul li { display: contents; }

/* ══════════════════════════
   SIDEBAR
══════════════════════════ */
.sidebar { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 80px; }

.s-widget { background: var(--card); border: 0.5px solid var(--border); border-radius: var(--r); padding: 18px; }
.w-title { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--txt3); margin-bottom: 16px; }
.w-item {
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 10px;
  padding: 9px 0;
  border-bottom: 0.5px solid var(--border);
  color: var(--txt2); transition: color .15s;
}
.w-item:last-child { border-bottom: none; padding-bottom: 0; }
.w-item:hover { color: var(--txt); }
.wi-title { flex: 1; font-family: var(--serif); font-size: 14px; line-height: 1.4; }
.wi-count { font-size: 11px; color: var(--txt3); white-space: nowrap; }

.stats-row { display: grid; grid-template-columns: 1fr 1fr; border: 0.5px solid var(--border); border-radius: var(--r); overflow: hidden; }
.stat-box { background: var(--card); padding: 14px; text-align: center; }
.stat-num { font-family: var(--serif); font-size: 24px; font-weight: 300; color: var(--txt); }
.stat-lbl { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--txt3); margin-top: 2px; }

.submit-widget { background: var(--card); border: 0.5px solid var(--border); border-radius: var(--r); padding: 22px; text-align: center; }
.s-icon { width: 42px; height: 42px; margin: 0 auto 12px; border: 0.5px solid var(--border2); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--accent); }
.s-title { font-family: var(--serif); font-size: 19px; font-weight: 300; color: var(--txt); margin-bottom: 8px; }
.s-desc { font-size: 12px; color: var(--txt2); line-height: 1.6; margin-bottom: 16px; }
.s-btn { display: block; width: 100%; padding: 9px; border: 0.5px solid var(--accent2); border-radius: var(--r-sm); background: transparent; color: var(--accent); font-size: 12px; letter-spacing: .07em; text-transform: uppercase; transition: all .2s; }
.s-btn:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }

/* ══════════════════════════
   FOOTER
══════════════════════════ */
.site-footer { border-top: 0.5px solid var(--border); padding: 40px 0; }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 0 28px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-desc { font-size: 13px; color: var(--txt2); line-height: 1.7; margin-top: 10px; }
.fc-title { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--txt3); margin-bottom: 14px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-links a { font-size: 13px; color: var(--txt2); transition: color .15s; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { max-width: var(--max); margin: 28px auto 0; padding: 18px 28px 0; border-top: 0.5px solid var(--border); display: flex; justify-content: space-between; font-size: 12px; color: var(--txt3); }

/* ══════════════════════════
   SINGLE POST
══════════════════════════ */
.post-hero-wrap {
  width: 100%;
  background: var(--bg2);
}
.post-hero-wrap img {
  width: 100%;
  height: auto;
  max-height: 88vh;
  object-fit: contain;
  object-position: top center;
  display: block;
  margin: 0 auto;
}
.post-hero-placeholder { width: 100%; aspect-ratio: 16/9; background: var(--card); }

.post-wrap { max-width: var(--max); margin: 0 auto; padding: 0 28px; display: grid; grid-template-columns: 1fr var(--side); gap: 48px; padding-top: 36px; padding-bottom: 80px; }

.post-breadcrumb { display: flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--txt3); margin-bottom: 18px; }
.post-breadcrumb a { color: var(--accent); }
.post-breadcrumb a:hover { opacity: .75; }
.post-breadcrumb a.b2 { color: var(--txt2); }
.sep { opacity: .35; }

.post-title { font-family: var(--serif); font-size: clamp(28px, 4vw, 44px); font-weight: 300; line-height: 1.15; color: var(--txt); margin-bottom: 20px; }

.post-byline { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--txt2); padding-bottom: 24px; border-bottom: 0.5px solid var(--border); margin-bottom: 30px; flex-wrap: wrap; }
.byline-av { width: 34px; height: 34px; border-radius: 50%; background: var(--card2); border: 0.5px solid var(--border2); display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--accent); font-family: var(--serif); overflow: hidden; flex-shrink: 0; }
.byline-av img { width: 100%; height: 100%; object-fit: cover; }
.byline-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--txt3); flex-shrink: 0; }

.post-body { font-size: 17px; line-height: 1.88; color: #cbc7bf; }
.post-body p { margin-bottom: 22px; }
.post-body p:last-child { margin-bottom: 0; }
.post-body h2 { font-family: var(--serif); font-size: 26px; font-weight: 300; color: var(--txt); margin: 36px 0 14px; }
.post-body h3 { font-family: var(--serif); font-size: 21px; font-weight: 300; color: var(--txt); margin: 28px 0 12px; }
.post-body ul, .post-body ol { padding-left: 20px; margin-bottom: 22px; }
.post-body li { margin-bottom: 5px; }

.pull-quote { font-family: var(--serif); font-size: clamp(20px, 2.5vw, 24px); font-style: italic; font-weight: 300; color: var(--txt); border-left: 2px solid var(--accent); padding: 14px 22px; margin: 36px 0; line-height: 1.45; }

.post-tags-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 30px 0; padding: 22px 0; border-top: 0.5px solid var(--border); border-bottom: 0.5px solid var(--border); }
.post-tag { font-size: 12px; padding: 5px 14px; border-radius: 20px; border: 0.5px solid var(--border2); color: var(--txt2); transition: all .15s; }
.post-tag:hover { color: var(--accent); border-color: rgba(var(--accent-rgb),.4); }

.share-row { display: flex; align-items: center; gap: 10px; margin-bottom: 44px; flex-wrap: wrap; }
.share-lbl { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--txt3); }
.share-btn { display: flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--r-sm); border: 0.5px solid var(--border2); background: transparent; color: var(--txt2); font-size: 12px; transition: all .15s; }
.share-btn:hover { color: var(--txt); border-color: var(--border); }

/* Related */
.related-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.rel-card { background: var(--card); border: 0.5px solid var(--border); border-radius: var(--r-sm); overflow: hidden; display: block; transition: border-color .2s, transform .2s; }
.rel-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.rel-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--card2); }
.rel-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .4s ease; display: block; }
.rel-card:hover .rel-thumb img { transform: scale(1.05); }
.rel-info { padding: 11px 13px; }
.rel-cat { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; opacity: .8; }
.rel-title { font-family: var(--serif); font-size: 14px; color: var(--txt); line-height: 1.3; }

/* Post sticky sidebar */
.post-sidebar { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 18px; }
.swatch { width: 14px; height: 14px; border-radius: 50%; display: inline-block; border: 1px solid rgba(255,255,255,.1); }

/* Comments */
.comments-area { margin-top: 52px; }
.comments-title { font-family: var(--serif); font-size: 22px; font-weight: 300; color: var(--txt); margin-bottom: 22px; }
.comment-list { list-style: none; margin-bottom: 28px; }
.comment-box { background: var(--card2); border: 0.5px solid var(--border); border-radius: var(--r-sm); padding: 16px; margin-bottom: 12px; }
.comment-author-name { font-size: 13px; font-weight: 500; color: var(--txt); margin-bottom: 5px; }
.comment-text { font-size: 14px; color: var(--txt2); line-height: 1.7; }
.comment-form p { margin-bottom: 13px; }
.comment-form label { display: block; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--txt3); margin-bottom: 6px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { background: var(--card2); border: 0.5px solid var(--border2); border-radius: var(--r-sm); padding: 11px 14px; color: var(--txt); font-size: 14px; width: 100%; outline: none; transition: border-color .2s; }
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--accent2); }
.comment-form textarea { resize: vertical; }
.comment-form input[type="submit"] { padding: 10px 26px; border: 0.5px solid var(--accent2); border-radius: var(--r-sm); background: transparent; color: var(--accent); font-size: 13px; letter-spacing: .06em; transition: all .2s; }
.comment-form input[type="submit"]:hover { background: var(--accent); color: var(--bg); }

/* Icon */
.icon { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; flex-shrink: 0; }

/* ══════════════════════════
   RESPONSIVE
══════════════════════════ */
@media (max-width: 960px) {
  :root { --side: 240px; }
  .hero-body { padding: 28px 28px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-inner > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .container, .nav-inner, .main-wrap, .footer-inner, .footer-bottom, .post-wrap { padding-left: 16px; padding-right: 16px; }
  .nav-links { display: none; flex-direction: column; position: fixed; top: 62px; left: 0; right: 0; bottom: 0; background: rgba(15,14,13,.98); padding: 32px 20px; gap: 22px; font-size: 15px; z-index: 199; }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
  .main-wrap { grid-template-columns: 1fr; gap: 32px; }
  .sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .sidebar > * { flex: 1 1 calc(50% - 9px); min-width: 200px; }
  .articles-grid { grid-template-columns: 1fr; gap: 16px; }
  .hero-inner { height: 55vh; }
  .hero-body { padding: 20px 18px; }
  .hero-title { font-size: clamp(22px, 5vw, 32px); }
  .post-wrap { grid-template-columns: 1fr; padding-top: 24px; }
  .post-sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .post-sidebar > * { flex: 1 1 calc(50% - 9px); min-width: 200px; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 20px; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }
}

@media (max-width: 480px) {
  .articles-grid { gap: 12px; }
  .related-grid { grid-template-columns: 1fr; }
  .post-sidebar { flex-direction: column; }
  .sidebar { flex-direction: column; }
  .sidebar > * { flex: 1 1 100%; }
}
