/*
Theme Name: AIWireX CANVAS
Theme URI: https://aiwirex.com
Author: ACWirex
Description: Dark museum gallery theme for AI digital art. Pure black. Images as artworks. Text on hover.
Version: 1.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-canvas
Tags: dark, art, gallery, full-width, custom-menu, featured-images
*/

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

:root {
  --black:    #050505;
  --black2:   #0d0d0d;
  --black3:   #141414;
  --white:    #f0ede6;
  --white2:   #a0a0a0;
  --white3:   #555;
  --gold:     #E8C547;
  --gold2:    #b89c35;
  --gold-rgb: 232, 197, 71;
  --border:   rgba(255,255,255,0.06);
  --border2:  rgba(255,255,255,0.12);
  --serif:    'DM Serif Display', Georgia, serif;
  --sans:     'Space Grotesk', system-ui, sans-serif;
  --mono:     'JetBrains Mono', monospace;
  --gap:      2px;
  --r:        4px;
  --max:      1400px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.6;
  cursor: none;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a  { color: inherit; text-decoration: none; cursor: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
button, input, textarea, select { font-family: var(--sans); cursor: none; }

/* ══════════════════════════════════════
   CUSTOM CURSOR
══════════════════════════════════════ */
#c-dot {
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%,-50%);
  transition: transform .1s ease, opacity .2s;
  will-change: transform;
}
#c-ring {
  width: 32px; height: 32px;
  border: 1px solid rgba(var(--gold-rgb), .45);
  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 #c-ring {
  width: 52px; height: 52px;
  border-color: rgba(var(--gold-rgb), .9);
}
body.c-hover #c-dot { transform: translate(-50%,-50%) scale(0); }
@media (hover: none) {
  #c-dot, #c-ring { display: none; }
  body, a, button { cursor: auto; }
}

/* ══════════════════════════════════════
   NAVIGATION
══════════════════════════════════════ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 500;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px;
  background: linear-gradient(to bottom, rgba(5,5,5,.95) 0%, transparent 100%);
  transition: background .3s;
}
.site-header.scrolled {
  background: rgba(5,5,5,.96);
  border-bottom: 0.5px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-logo {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: .1em;
  color: var(--white);
  display: flex; align-items: center; gap: 8px;
}
.site-logo .logo-x { color: var(--gold); font-style: italic; }
.site-logo .logo-sub {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--white3);
  font-weight: 400;
}

.nav-links {
  display: flex; align-items: center; gap: 32px;
  list-style: none;
  font-size: 10px; letter-spacing: .15em; text-transform: uppercase;
  color: var(--white2);
}
.nav-links a { transition: color .2s; }
.nav-links a:hover { color: var(--gold); }
.nav-cta {
  padding: 6px 16px;
  border: 0.5px solid rgba(var(--gold-rgb),.4);
  border-radius: 20px;
  color: var(--gold) !important;
  transition: all .2s;
}
.nav-cta:hover { background: var(--gold) !important; color: var(--black) !important; }

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

/* ══════════════════════════════════════
   MAIN CONTENT OFFSET
══════════════════════════════════════ */
.site-main { padding-top: 0; }

/* ══════════════════════════════════════
   HERO — FEATURED POST (full width)
══════════════════════════════════════ */
.hero-post {
  position: relative;
  width: 100%;
  height: 90vh;
  min-height: 500px;
  overflow: hidden;
  display: block;
}
.hero-post-img {
  position: absolute; inset: 0;
  transition: transform .6s ease;
}
.hero-post:hover .hero-post-img { transform: scale(1.03); }
.hero-post-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to top,
    rgba(5,5,5,.92) 0%,
    rgba(5,5,5,.3) 45%,
    rgba(5,5,5,.05) 100%
  );
}
.hero-post-body {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 48px 56px;
  transform: translateY(6px);
  transition: transform .4s ease;
}
.hero-post:hover .hero-post-body { transform: translateY(0); }

.hero-cat {
  display: inline-block;
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); border: 0.5px solid rgba(var(--gold-rgb),.35);
  padding: 4px 12px; border-radius: 20px;
  margin-bottom: 14px;
}
.hero-title {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 54px);
  font-weight: 400;
  color: var(--white);
  line-height: 1.15;
  max-width: 700px;
  margin-bottom: 16px;
}
.hero-meta {
  font-size: 12px; color: rgba(255,255,255,.45);
  font-family: var(--mono); letter-spacing: .04em;
}

/* ══════════════════════════════════════
   GALLERY GRID
══════════════════════════════════════ */
.gallery-section { padding: 0; }

.gallery-label {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 32px;
  font-size: 9px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--white3);
}
.gallery-label::after {
  content: ''; flex: 1; height: .5px; background: var(--border);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}

/* ── GALLERY CARD ── */
.g-card {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  display: block;
  background: var(--black2);
}

/* Wide card: spans 2 cols */
.g-card.wide { grid-column: span 2; aspect-ratio: 8 / 3; }

/* Tall card: taller */
.g-card.tall { aspect-ratio: 3 / 4; }

.g-card-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  transition: transform .55s ease;
}
.g-card:hover .g-card-img { transform: scale(1.05); }

.g-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to top,
    rgba(5,5,5,.88) 0%,
    rgba(5,5,5,.15) 50%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity .35s ease;
}
.g-card:hover .g-card-overlay { opacity: 1; }

.g-card-body {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 20px 22px;
  transform: translateY(8px);
  opacity: 0;
  transition: transform .35s ease, opacity .35s ease;
}
.g-card:hover .g-card-body { transform: translateY(0); opacity: 1; }

.g-cat {
  font-size: 9px; letter-spacing: .15em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 6px; display: block;
}
.g-title {
  font-family: var(--serif);
  font-size: 18px; font-weight: 400;
  color: var(--white); line-height: 1.25;
}
.g-meta {
  font-size: 11px; color: rgba(255,255,255,.4);
  font-family: var(--mono);
  margin-top: 6px;
}

/* ══════════════════════════════════════
   PAGINATION
══════════════════════════════════════ */
.canvas-pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; padding: 40px 32px;
  border-top: 0.5px solid var(--border);
}
.page-numbers {
  width: 36px; height: 36px;
  border-radius: var(--r);
  border: 0.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--white2);
  transition: all .15s;
}
.page-numbers:hover { border-color: var(--border2); color: var(--white); }
.page-numbers.current { border-color: var(--gold2); color: var(--gold); }
.page-numbers.prev, .page-numbers.next { font-size: 16px; color: var(--white3); }

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.site-footer {
  border-top: 0.5px solid var(--border);
  padding: 32px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; color: var(--white3);
  letter-spacing: .06em;
}
.footer-logo { font-family: var(--serif); font-size: 15px; color: var(--white2); }
.footer-logo em { color: var(--gold); font-style: italic; }
.footer-links { display: flex; gap: 24px; list-style: none; }
.footer-links a:hover { color: var(--gold); }

/* ══════════════════════════════════════
   SINGLE POST
══════════════════════════════════════ */
.post-full-img {
  width: 100%;
  max-height: 85vh;
  overflow: hidden;
  position: relative;
  margin-top: 0;
}
.post-full-img img {
  width: 100%;
  height: auto;
  max-height: 85vh;
  object-fit: contain;
  object-position: top center;
  display: block;
}

.post-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 32px 80px;
}

.post-breadcrumb {
  display: flex; align-items: center; gap: 10px;
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--white3); margin-bottom: 20px;
}
.post-breadcrumb a { color: var(--gold); transition: opacity .15s; }
.post-breadcrumb a:hover { opacity: .7; }
.post-breadcrumb a.b2 { color: var(--white3); }
.post-breadcrumb .sep { opacity: .35; }

.post-title {
  font-family: var(--serif);
  font-size: clamp(28px, 4.5vw, 46px);
  font-weight: 400;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 20px;
}
.post-byline {
  display: flex; align-items: center; gap: 14px;
  font-size: 12px; color: var(--white3);
  padding-bottom: 24px;
  border-bottom: 0.5px solid var(--border);
  margin-bottom: 32px;
  font-family: var(--mono);
  flex-wrap: wrap;
}
.byline-av {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--black3); border: 0.5px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--gold);
  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(--white3); flex-shrink: 0; }

.post-body {
  font-size: 16px; line-height: 1.9;
  color: rgba(240,237,230,.78);
}
.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: 400; color: var(--white); margin: 36px 0 14px; }
.post-body h3 { font-family: var(--serif); font-size: 20px; font-weight: 400; color: var(--white); margin: 28px 0 12px; }
.post-body ul, .post-body ol { padding-left: 22px; margin-bottom: 22px; }
.post-body li { margin-bottom: 6px; }

.post-pull {
  font-family: var(--serif);
  font-size: clamp(20px, 2.5vw, 26px);
  font-style: italic; font-weight: 400;
  color: var(--white);
  border-left: 2px solid var(--gold);
  padding: 14px 24px;
  margin: 36px 0;
  line-height: 1.45;
}

.post-tags-row {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 32px 0; padding: 24px 0;
  border-top: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
}
.post-tag {
  font-size: 11px; padding: 4px 14px; border-radius: 20px;
  border: 0.5px solid var(--border2);
  color: var(--white3); letter-spacing: .04em;
  transition: all .15s;
}
.post-tag:hover { color: var(--gold); border-color: rgba(var(--gold-rgb),.4); }

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

/* ── RELATED ── */
.related-section { margin-top: 48px; }
.section-label {
  font-size: 9px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--white3); margin-bottom: 16px;
  display: flex; align-items: center; gap: 12px;
}
.section-label::after { content: ''; flex: 1; height: .5px; background: var(--border); }

.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.rel-card {
  position: relative;
  aspect-ratio: 4/3; overflow: hidden; display: block;
  background: var(--black2);
  transition: transform .2s;
}
.rel-card:hover { transform: scale(.99); }
.rel-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .5s ease; }
.rel-card:hover img { transform: scale(1.05); }
.rel-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(5,5,5,.85) 0%, transparent 60%); opacity: 0; transition: opacity .3s; }
.rel-card:hover .rel-overlay { opacity: 1; }
.rel-body { position: absolute; bottom: 0; left: 0; right: 0; padding: 14px; opacity: 0; transform: translateY(6px); transition: all .3s; }
.rel-card:hover .rel-body { opacity: 1; transform: translateY(0); }
.rel-cat { font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; display: block; }
.rel-title { font-family: var(--serif); font-size: 14px; color: var(--white); line-height: 1.3; }

/* ── COMMENTS ── */
.comments-area { margin-top: 56px; }
.comments-title { font-family: var(--serif); font-size: 22px; font-weight: 400; color: var(--white); margin-bottom: 24px; }
.comment-list { list-style: none; margin-bottom: 32px; }
.comment-body-wrap { background: var(--black2); border: 0.5px solid var(--border); border-radius: var(--r); padding: 16px; margin-bottom: 14px; }
.comment-author { font-size: 13px; font-weight: 500; color: var(--white); margin-bottom: 6px; }
.comment-text { font-size: 14px; color: var(--white2); line-height: 1.7; }
.comment-form label { display: block; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--white3); margin-bottom: 6px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  background: var(--black2); border: 0.5px solid var(--border2);
  border-radius: var(--r); padding: 11px 14px;
  color: var(--white); font-size: 14px; width: 100%; outline: none;
  transition: border-color .2s;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--gold2); }
.comment-form textarea { resize: vertical; }
.comment-form p { margin-bottom: 14px; }
.comment-form input[type="submit"] {
  padding: 11px 28px; border: 0.5px solid var(--gold2);
  border-radius: var(--r); background: transparent;
  color: var(--gold); font-size: 13px; letter-spacing: .06em;
  transition: all .2s;
}
.comment-form input[type="submit"]:hover { background: var(--gold); color: var(--black); }

/* ── POST SIDEBAR WIDGET ── */
.sidebar-widget { border: 0.5px solid var(--border); border-radius: var(--r); padding: 16px; margin-bottom: 16px; }
.widget-title { font-size: 9px; letter-spacing: .15em; text-transform: uppercase; color: var(--white3); margin-bottom: 14px; }
.widget-item { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 0.5px solid var(--border); font-size: 13px; color: var(--white2); cursor: none; transition: color .15s; }
.widget-item:last-child { border-bottom: none; padding-bottom: 0; }
.widget-item:hover { color: var(--gold); }
.wi-title { flex: 1; line-height: 1.4; font-family: var(--serif); font-size: 13px; }
.wi-count { font-size: 11px; color: var(--white3); white-space: nowrap; font-family: var(--mono); }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .g-card.wide { grid-column: span 2; aspect-ratio: 16/7; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-post-body { padding: 32px 32px; }
  .hero-title { font-size: clamp(22px, 4vw, 36px); }
}

@media (max-width: 600px) {
  .site-header { padding: 0 20px; }
  .nav-links { display: none; flex-direction: column; position: fixed; top: 60px; left: 0; right: 0; bottom: 0; background: rgba(5,5,5,.98); padding: 32px 24px; gap: 24px; font-size: 15px; letter-spacing: .1em; z-index: 499; }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
  .gallery-grid { grid-template-columns: 1fr; }
  .g-card.wide { grid-column: span 1; aspect-ratio: 4/3; }
  .g-card-body { opacity: 1; transform: none; }
  .g-card-overlay { opacity: 1; }
  .hero-post { height: 70vh; }
  .hero-post-body { padding: 24px 20px; }
  .post-container { padding: 32px 20px 60px; }
  .related-grid { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; gap: 16px; text-align: center; }
  .footer-links { justify-content: center; }
}

/* ══════════════════════════════════════
   UTILITY
══════════════════════════════════════ */
.icon { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; flex-shrink: 0; }
.swatch { width: 13px; height: 13px; border-radius: 50%; display: inline-block; border: 1px solid rgba(255,255,255,.1); }
