/*
Theme Name: Chenar
Theme URI: https://chenar.studio
Author: Chenar Studio
Author URI: https://chenar.studio
Description: Chenar — a warm, glassy one-page theme for a digital design & marketing studio. Features an animated tree logo, light/dark mode, scroll reveals, animated stats, and a dynamic 3D card-stack for projects (managed from the Projects post type).
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: chenar
Tags: one-page, portfolio, custom-colors, dark-mode, translation-ready, custom-logo
*/

/* ==========================================================================
   Chenar — Digital design & marketing studio
   Recreated from the Chenar.dc.html Claude Design prototype.
   ========================================================================== */

/* ---- Reset & base ---- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg2);
  color: var(--base);
  font-family: var(--body-font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: #9E5C34; text-decoration: none; }
a:hover { color: #B86E41; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
::selection { background: rgba(184, 110, 65, 0.22); }
img { display: block; max-width: 100%; }

/* ---- Design tokens ---- */
:root {
  color-scheme: light;
  --bg1: #EFE9DE;  --bg2: #E6E3D4;
  --ink: #20352C;  --body: #575A4E;  --base: #2B2B2B;  --muted: #8C8F7A;
  --panel: rgba(255, 255, 255, 0.42);  --panel-soft: rgba(255, 255, 255, 0.28);
  --panel-border: rgba(255, 255, 255, 0.6);  --hairline: rgba(255, 255, 255, 0.5);
  --divider: rgba(43, 43, 43, 0.13);  --footer-bg: #20352C;
  --wash1: rgba(237, 231, 221, 0.5);  --wash2: rgba(237, 231, 221, 0.72);  --wash3: #EDE7DD;
  --accent: #B86E41;
  --heading-font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
  --body-font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
  --mono-font: ui-monospace, 'SF Mono', 'SFMono-Regular', Menlo, monospace;
  --serif-font: 'Cormorant Garamond', serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg1: #14211A;  --bg2: #0C1611;
  --ink: #F1EEE6;  --body: #B7C1B4;  --base: #E8E5DC;  --muted: #8E998A;
  --panel: rgba(255, 255, 255, 0.07);  --panel-soft: rgba(255, 255, 255, 0.045);
  --panel-border: rgba(255, 255, 255, 0.14);  --hairline: rgba(255, 255, 255, 0.1);
  --divider: rgba(255, 255, 255, 0.1);  --footer-bg: #0A120D;
  --wash1: rgba(9, 15, 11, 0.4);  --wash2: rgba(9, 15, 11, 0.72);  --wash3: #0C1611;
}

/* ---- Keyframes ---- */
@keyframes chFloat { 0% { transform: translateY(0); } 50% { transform: translateY(-12px); } 100% { transform: translateY(0); } }
@keyframes chDraw { to { stroke-dashoffset: 0; } }
@keyframes chNode { 0% { opacity: 0; transform: scale(0); } 100% { opacity: 1; transform: scale(1); } }
@keyframes chLeaf { 0% { opacity: 0; transform: scale(.2); } 100% { opacity: 1; transform: scale(1); } }
@keyframes chSway { 0%, 100% { transform: rotate(-3.5deg); } 50% { transform: rotate(3.5deg); } }
@keyframes chCode { 0% { opacity: 0; } 20% { opacity: .8; } 65% { opacity: .6; } 100% { opacity: 0; } }
@keyframes chBlobA { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(9vw, 7vh) scale(1.14); } 100% { transform: translate(0, 0) scale(1); } }
@keyframes chBlobB { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-8vw, 9vh) scale(1.18); } 100% { transform: translate(0, 0) scale(1); } }
@keyframes chBlobC { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(7vw, -8vh) scale(1.12); } 100% { transform: translate(0, 0) scale(1); } }
@keyframes chBlobD { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-10vw, -6vh) scale(1.2); } 100% { transform: translate(0, 0) scale(1); } }

/* ---- Page shell ---- */
.ch-page {
  position: relative;
  min-height: 100vh;
  background: linear-gradient(160deg, var(--bg1) 0%, var(--bg2) 100%);
  color: var(--base);
  text-align: left;
  overflow-x: hidden;
}

/* ---- Animated background blobs ---- */
.ch-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.ch-blob {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}
.ch-blob--a {
  width: 54vw; height: 54vw; left: -12vw; top: -10vw;
  background: radial-gradient(circle, rgba(95, 158, 147, 0.55), transparent 68%);
  filter: blur(48px); animation: chBlobA 26s ease-in-out infinite;
}
.ch-blob--b {
  width: 46vw; height: 46vw; right: -8vw; top: 16vh;
  background: radial-gradient(circle, rgba(184, 110, 65, 0.34), transparent 68%);
  filter: blur(52px); animation: chBlobB 32s ease-in-out infinite;
}
.ch-blob--c {
  width: 52vw; height: 52vw; left: 14vw; bottom: -16vw;
  background: radial-gradient(circle, rgba(32, 53, 44, 0.42), transparent 66%);
  filter: blur(56px); animation: chBlobC 29s ease-in-out infinite;
}
.ch-blob--d {
  width: 42vw; height: 42vw; right: 8vw; bottom: 8vh;
  background: radial-gradient(circle, rgba(140, 143, 122, 0.42), transparent 68%);
  filter: blur(50px); animation: chBlobD 35s ease-in-out infinite;
}

/* ---- Reveal-on-scroll utility ---- */
.ch-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s ease, transform .8s ease, box-shadow .5s ease, border-color .4s ease, background .35s ease, padding .35s ease;
}
.ch-reveal.is-visible { opacity: 1; transform: none; }

/* ---- Shared layout ---- */
.ch-container { max-width: 1220px; margin: 0 auto; padding: 0 34px; }

.ch-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono-font); text-transform: uppercase;
  letter-spacing: 0.16em; font-size: 12px; color: var(--accent);
  margin-bottom: 20px;
}
.ch-kicker__dot { width: 6px; height: 6px; background: var(--accent); border-radius: 1px; display: inline-block; }

.ch-h2 {
  font-family: var(--heading-font); letter-spacing: -0.025em; font-weight: 600;
  color: var(--ink); font-size: clamp(34px, 5vw, 60px); line-height: 1.04; margin: 0;
}
.ch-head-row {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 24px; flex-wrap: wrap; margin-bottom: 48px;
}
.ch-morelink {
  font-size: 15px; font-weight: 500; display: inline-flex; align-items: center;
  gap: 6px; color: var(--ink); white-space: nowrap;
}

/* ---- Buttons ---- */
.ch-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--accent); color: #F6F1E9;
  padding: 9px 20px; border: none; border-radius: 980px;
  font-size: 14px; font-weight: 600; letter-spacing: -0.01em;
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s ease;
}
.ch-btn:hover { color: #F6F1E9; transform: translateY(-2px); box-shadow: 0 10px 22px rgba(184, 110, 65, 0.32); }
.ch-btn--lg {
  gap: 8px; padding: 15px 32px; font-size: 16px;
  box-shadow: 0 12px 30px rgba(184, 110, 65, 0.32), inset 0 1px 0 var(--panel);
}
.ch-btn--lg:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 18px 40px rgba(184, 110, 65, 0.36); }
.ch-btn__arrow { font-size: 15px; }

.ch-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink); padding: 15px 12px; font-size: 16px; font-weight: 500;
  transition: gap .3s ease;
}
.ch-link:hover { color: var(--ink); gap: 12px; }

/* ---- Header ---- */
.ch-header {
  position: sticky; top: 16px; z-index: 50;
  width: calc(100% - 32px); max-width: 1120px; margin: 16px auto 0;
  border-radius: 980px; background: var(--panel);
  backdrop-filter: blur(26px) saturate(1.8); -webkit-backdrop-filter: blur(26px) saturate(1.8);
  border: 1px solid var(--panel-border);
  box-shadow: 0 10px 34px rgba(32, 53, 44, 0.14), inset 0 1px 0 var(--panel-border);
  transition: box-shadow .35s ease;
}
.ch-header__inner {
  max-width: 1220px; margin: 0 auto;
  padding: 11px 14px 11px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  transition: padding .35s ease;
}
.ch-logo { display: flex; align-items: center; gap: 10px; color: var(--base); }
.ch-logo:hover { color: var(--base); }
.ch-logo .chtree { width: 38px; height: 32px; display: block; flex-shrink: 0; }
.ch-wordmark {
  font-family: var(--serif-font); font-size: 27px; font-weight: 600;
  letter-spacing: 0.08em; color: var(--ink);
}
.ch-nav {
  display: flex; align-items: center; gap: 30px; flex-wrap: wrap; font-size: 15px;
}
.ch-nav a { color: var(--body); }
.ch-nav a:hover { color: var(--ink); }
.ch-actions { display: flex; align-items: center; gap: 12px; }
.ch-theme-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--panel);
  backdrop-filter: blur(16px) saturate(1.6); -webkit-backdrop-filter: blur(16px) saturate(1.6);
  border: 1px solid var(--panel-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink); flex-shrink: 0;
  transition: transform .3s ease, color .3s ease;
}
.ch-theme-btn:hover { transform: translateY(-2px); }
.ch-ic-moon { display: none; }
:root[data-theme="dark"] .ch-ic-sun { display: none; }
:root[data-theme="dark"] .ch-ic-moon { display: inline-block; }

/* ---- Hero ---- */
.ch-hero {
  position: relative; scroll-margin-top: 90px;
  padding: 76px 0 40px; overflow: hidden;
}
.ch-hero__wc { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.ch-hero__wc img { width: 100%; height: 100%; object-fit: cover; object-position: center top; opacity: 0.14; }
.ch-hero__wash {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, var(--wash1) 0%, var(--wash2) 55%, var(--wash3) 100%);
}
.ch-hero__inner {
  max-width: 900px; margin: 0 auto; padding: 0 34px;
  position: relative; z-index: 1; text-align: center;
}
.ch-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--panel);
  backdrop-filter: blur(16px) saturate(1.6); -webkit-backdrop-filter: blur(16px) saturate(1.6);
  border: 1px solid var(--panel-border); border-radius: 980px;
  padding: 7px 15px; font-size: 13px; color: var(--body); margin-bottom: 30px;
}
.ch-badge__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; }
.ch-h1 {
  font-family: var(--heading-font); letter-spacing: -0.03em; font-weight: 600;
  color: var(--ink); font-size: clamp(48px, 8vw, 104px); line-height: 0.98;
  margin: 0 auto; max-width: 14ch;
}
.ch-lead {
  font-size: clamp(18px, 2vw, 22px); color: var(--body);
  margin: 28px auto 0; max-width: 600px; line-height: 1.45;
}
.ch-hero__cta {
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
  justify-content: center; margin-top: 36px;
}

/* ---- Stats ---- */
.ch-stats {
  padding: 44px 0;
  border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
}
.ch-stats__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 32px 20px;
}
.ch-stat { text-align: center; }
.ch-stat__num {
  font-family: var(--heading-font); font-weight: 600; letter-spacing: -0.03em;
  font-size: clamp(38px, 5vw, 58px); color: var(--ink); line-height: 1;
}
.ch-stat__label {
  font-family: var(--mono-font); text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 11.5px; color: var(--muted); margin-top: 10px;
}

/* ---- Sections shared spacing ---- */
.ch-section { position: relative; scroll-margin-top: 80px; padding: 104px 0; overflow: hidden; }

/* ---- Capabilities (dark band) ---- */
.ch-caps {
  position: relative; scroll-margin-top: 80px; padding: 104px 0;
  color: #EDE7DD; overflow: hidden;
  background: rgba(24, 40, 32, 0.82);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.ch-caps__head { max-width: 720px; margin-bottom: 56px; }
.ch-caps .ch-kicker { color: #D68A5C; }
.ch-caps .ch-kicker__dot { background: #D68A5C; }
.ch-caps__title {
  font-family: var(--heading-font); letter-spacing: -0.025em; font-weight: 600;
  font-size: clamp(34px, 5vw, 64px); line-height: 1.03; margin: 0 0 20px; color: #F3EEE4;
}
.ch-caps__lead { font-size: clamp(16px, 1.6vw, 19px); color: rgba(237, 231, 221, 0.68); margin: 0; max-width: 620px; }
.ch-caps__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.ch-cap-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  border-radius: 22px; padding: 32px 30px;
}
.ch-cap-card:hover { border-color: rgba(214, 138, 92, 0.5); }
.ch-cap-card__icon {
  width: 46px; height: 46px; border-radius: 13px;
  background: rgba(214, 138, 92, 0.16);
  display: flex; align-items: center; justify-content: center; margin-bottom: 22px;
}
.ch-cap-card h3 {
  font-family: var(--heading-font); letter-spacing: -0.01em; font-weight: 600;
  font-size: 21px; margin: 0 0 10px; color: #F3EEE4;
}
.ch-cap-card p { font-size: 15px; color: rgba(237, 231, 221, 0.66); margin: 0; line-height: 1.55; }

/* ---- Process ---- */
.ch-process__head { max-width: 640px; margin-bottom: 56px; }
.ch-proc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; }
.ch-proc-card {
  background: var(--panel);
  backdrop-filter: blur(24px) saturate(1.7); -webkit-backdrop-filter: blur(24px) saturate(1.7);
  border: 1px solid var(--panel-border);
  box-shadow: inset 0 1px 0 var(--panel-border), 0 10px 34px rgba(32, 53, 44, 0.10);
  border-radius: 24px; padding: 34px 30px;
  display: flex; flex-direction: column; min-height: 280px;
}
.ch-proc-card:hover { box-shadow: 0 26px 50px rgba(32, 53, 44, 0.12); transform: translateY(-4px); }
.ch-proc-card__num { font-family: var(--mono-font); font-size: 14px; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 22px; }
.ch-proc-card h3 { font-family: var(--heading-font); letter-spacing: -0.015em; font-weight: 600; color: var(--ink); font-size: 25px; margin: 0 0 12px; }
.ch-proc-card p { color: var(--body); font-size: 15.5px; margin: 0 0 24px; line-height: 1.55; }
.ch-proc-card__time {
  margin-top: auto; display: inline-flex; align-self: flex-start; align-items: center; gap: 8px;
  font-size: 12.5px; font-family: var(--mono-font); color: var(--body);
  background: var(--hairline); border: 1px solid var(--panel-border);
  padding: 6px 13px; border-radius: 980px;
}

/* ---- Work ---- */
.ch-work-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.ch-work-card__media {
  aspect-ratio: 4 / 3; border-radius: 22px; overflow: hidden;
  background: var(--panel-soft); border: 1px solid var(--panel-border);
  transition: box-shadow .5s ease;
}
.ch-work-card:hover .ch-work-card__media { box-shadow: 0 26px 50px rgba(32, 53, 44, 0.16); }
.ch-work-card__media img { width: 100%; height: 100%; object-fit: cover; }
.ch-work-card__row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-top: 18px; }
.ch-work-card__row h3 { font-family: var(--heading-font); letter-spacing: -0.015em; font-weight: 600; color: var(--ink); font-size: 22px; margin: 0; }
.ch-work-card__year { font-family: var(--mono-font); font-size: 12px; color: var(--muted); white-space: nowrap; }
.ch-work-card__tags { font-size: 14px; color: var(--accent); margin-top: 5px; }

/* ---- Services ---- */
.ch-serv-list { border-bottom: 1px solid var(--divider); }
.ch-serv-row {
  display: flex; align-items: flex-start; gap: 24px;
  padding: 30px 12px; border-top: 1px solid var(--divider);
}
.ch-serv-row:hover {
  background: var(--panel);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding-left: 26px; padding-right: 26px;
}
.ch-serv-row__num { font-family: var(--mono-font); font-size: 14px; color: var(--muted); min-width: 40px; padding-top: 8px; }
.ch-serv-row__body { flex: 1; min-width: 0; }
.ch-serv-row__body h3 {
  font-family: var(--heading-font); letter-spacing: -0.02em; font-weight: 600;
  color: var(--ink); font-size: clamp(24px, 2.8vw, 36px); margin: 0 0 8px;
}
.ch-serv-row__body p { color: var(--body); font-size: 15.5px; margin: 0; max-width: 660px; line-height: 1.55; }
.ch-serv-row__arrow { font-size: 22px; color: var(--accent); padding-top: 4px; }

/* ---- Voices ---- */
.ch-voices-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.ch-voice-card {
  background: var(--panel);
  backdrop-filter: blur(24px) saturate(1.7); -webkit-backdrop-filter: blur(24px) saturate(1.7);
  border: 1px solid var(--panel-border);
  box-shadow: inset 0 1px 0 var(--panel-border), 0 10px 34px rgba(32, 53, 44, 0.10);
  border-radius: 24px; padding: 32px 30px;
  display: flex; flex-direction: column;
}
.ch-voice-card__q {
  font-family: var(--heading-font); font-weight: 500; letter-spacing: -0.01em;
  font-size: 20px; line-height: 1.4; color: var(--ink); margin: 0 0 28px;
}
.ch-voice-card__author { margin-top: auto; display: flex; align-items: center; gap: 14px; }
.ch-voice-card__name { font-weight: 600; font-size: 15px; color: var(--ink); }
.ch-voice-card__role { font-size: 13px; color: var(--muted); }
.ch-avatar {
  width: 52px; height: 52px; border-radius: 50%; overflow: hidden;
  background: #DED6C6; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}

/* ---- Insights ---- */
.ch-post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 380px)); gap: 24px; justify-content: center; }
.ch-post { color: inherit; display: block; }
.ch-post:hover { color: inherit; }
.ch-post__media {
  aspect-ratio: 16 / 10; border-radius: 22px; overflow: hidden;
  background: var(--panel-soft); border: 1px solid var(--panel-border);
  transition: box-shadow .5s ease;
}
.ch-post:hover .ch-post__media { box-shadow: 0 26px 50px rgba(32, 53, 44, 0.14); }
.ch-post__meta {
  display: flex; gap: 12px; align-items: center; margin-top: 18px;
  font-family: var(--mono-font); font-size: 12px; color: var(--accent);
}
.ch-post__cat { text-transform: uppercase; letter-spacing: 0.08em; }
.ch-post__sep { color: #BFC0B0; }
.ch-post__read { color: var(--muted); }
.ch-post h3 {
  font-family: var(--heading-font); letter-spacing: -0.02em; font-weight: 600;
  color: var(--ink); font-size: clamp(22px, 2.4vw, 29px); margin: 12px 0 14px; line-height: 1.15;
}
.ch-post__byline { font-size: 13.5px; color: var(--muted); }

/* ---- Contact ---- */
.ch-contact { position: relative; scroll-margin-top: 80px; padding: 110px 0 120px; overflow: hidden; }
.ch-contact__branch {
  position: absolute; top: 10px; right: -80px; width: min(36vw, 420px);
  height: auto; opacity: 0.5; pointer-events: none;
}
.ch-contact__inner { max-width: 720px; margin: 0 auto; padding: 0 34px; position: relative; }
.ch-contact__head { margin-bottom: 40px; text-align: center; }
.ch-contact__title {
  font-family: var(--heading-font); letter-spacing: -0.03em; font-weight: 600;
  color: var(--ink); font-size: clamp(38px, 5.6vw, 72px); line-height: 1;
  margin: 0 auto 18px; max-width: 14ch;
}
.ch-contact__intro { color: var(--body); font-size: 18px; margin: 0 auto; max-width: 520px; }

.ch-panel {
  background: var(--panel);
  backdrop-filter: blur(26px) saturate(1.7); -webkit-backdrop-filter: blur(26px) saturate(1.7);
  border: 1px solid var(--panel-border);
  box-shadow: inset 0 1px 0 var(--panel-border), 0 14px 40px rgba(32, 53, 44, 0.12);
  border-radius: 24px;
}
.ch-form { padding: 38px 34px; display: flex; flex-direction: column; gap: 20px; }
.ch-form__row { display: flex; gap: 18px; flex-wrap: wrap; }
.ch-field { flex: 1 1 200px; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; color: var(--muted); }
.ch-field--full { flex: 1 1 100%; }
.ch-field input, .ch-field select, .ch-field textarea {
  padding: 14px 16px; border: 1px solid var(--panel-border); border-radius: 12px;
  background: var(--panel);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: 15px; color: var(--base);
}
.ch-field textarea { resize: vertical; }
.ch-field input:focus, .ch-field select:focus, .ch-field textarea:focus { border-color: var(--accent); outline: none; }
.ch-form__submit {
  align-self: flex-start; background: var(--accent); color: #F6F1E9; border: none;
  padding: 15px 34px; border-radius: 980px; font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
  box-shadow: 0 12px 28px rgba(184, 110, 65, 0.3), inset 0 1px 0 var(--panel);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s ease;
}
.ch-form__submit:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(184, 110, 65, 0.36); }
.ch-thanks { padding: 52px 40px; text-align: center; }
.ch-thanks img { width: 70px; height: 70px; object-fit: contain; margin: 0 auto 12px; }
.ch-thanks h3 { font-family: var(--heading-font); letter-spacing: -0.02em; font-weight: 600; color: var(--ink); font-size: 30px; margin: 0 0 10px; }
.ch-thanks p { color: var(--body); margin: 0; }
[hidden] { display: none !important; }

/* ---- Footer ---- */
.ch-footer { border-top: 1px solid var(--divider); padding: 64px 0 40px; background: var(--footer-bg); color: #EDE7DD; }
.ch-footer__top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; margin-bottom: 44px; }
.ch-footer__brand { max-width: 300px; }
.ch-footer__logo { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ch-footer__logo img { width: 28px; height: 28px; object-fit: contain; }
.ch-footer__logo span { font-family: var(--serif-font); font-size: 24px; font-weight: 600; letter-spacing: 0.08em; color: #F3EEE4; }
.ch-footer__tagline { font-size: 14.5px; color: rgba(237, 231, 221, 0.6); margin: 0; }
.ch-footer__cols { display: flex; gap: 56px; flex-wrap: wrap; }
.ch-footer__col { display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.ch-footer__col-title {
  font-family: var(--mono-font); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em;
  color: rgba(237, 231, 221, 0.45); margin-bottom: 2px;
}
.ch-footer__col a { color: rgba(237, 231, 221, 0.82); }
.ch-footer__col a:hover { color: #F3EEE4; }
.ch-footer__city { color: rgba(237, 231, 221, 0.6); }
.ch-footer__bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: rgba(237, 231, 221, 0.5);
  border-top: 1px solid rgba(237, 231, 221, 0.12); padding-top: 22px;
}
.ch-footer__bottom a { color: rgba(237, 231, 221, 0.5); }
.ch-footer__bottom a:hover { color: #F3EEE4; }

/* ---- Image-slot placeholders (empty design slots) ---- */
.ch-ph {
  width: 100%; height: 100%; position: relative;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(120% 120% at 15% 12%, rgba(95, 158, 147, 0.32), transparent 55%),
    radial-gradient(120% 130% at 88% 90%, rgba(184, 110, 65, 0.28), transparent 60%),
    linear-gradient(150deg, rgba(32, 53, 44, 0.14), rgba(140, 143, 122, 0.12));
}
.ch-ph--alt {
  background:
    radial-gradient(120% 120% at 82% 15%, rgba(184, 110, 65, 0.32), transparent 55%),
    radial-gradient(120% 130% at 10% 92%, rgba(95, 158, 147, 0.26), transparent 60%),
    linear-gradient(150deg, rgba(32, 53, 44, 0.16), rgba(140, 143, 122, 0.10));
}
.ch-ph--warm {
  background:
    radial-gradient(120% 120% at 20% 20%, rgba(214, 138, 92, 0.34), transparent 58%),
    radial-gradient(120% 120% at 90% 85%, rgba(32, 53, 44, 0.18), transparent 60%),
    linear-gradient(150deg, rgba(184, 110, 65, 0.12), rgba(140, 143, 122, 0.12));
}
.ch-ph__leaf { width: 34%; max-width: 120px; opacity: 0.5; }
.ch-ph__label {
  position: absolute; left: 0; right: 0; bottom: 16px; text-align: center;
  font-family: var(--mono-font); text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 10.5px; color: rgba(32, 53, 44, 0.5);
}
:root[data-theme="dark"] .ch-ph__label { color: rgba(237, 231, 221, 0.5); }

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .ch-blob { animation: none !important; }
  .chtree * { animation: none !important; }
  .ch-reveal { transition: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   Work: 3D card stack (dynamic — one card per Project)
   Front card centered; the other projects peek out symmetrically behind it.
   ========================================================================== */
:root { --stack-card: rgba(250, 247, 240, 0.86); }
:root[data-theme="dark"] { --stack-card: rgba(24, 37, 30, 0.88); }

.ch-stack-wrap { max-width: 640px; margin: 0 auto; }
.ch-stack {
  position: relative;
  width: min(340px, 72vw);
  min-height: calc(min(340px, 72vw) * 0.75 + 116px);
  margin: 0 auto;
  perspective: 1600px;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.ch-stack-card {
  position: absolute; top: 0; left: 0; width: 100%;
  background: var(--stack-card);
  backdrop-filter: blur(24px) saturate(1.7); -webkit-backdrop-filter: blur(24px) saturate(1.7);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  box-shadow: inset 0 1px 0 var(--panel-border), 0 22px 54px rgba(32, 53, 44, 0.20);
  padding: 14px 14px 22px;
  transform-origin: center center;
  transition: transform .6s cubic-bezier(.2, .8, .2, 1), opacity .6s ease, box-shadow .6s ease;
  will-change: transform;
}
.ch-stack-card.is-front { cursor: grab; }
.ch-stack-card.is-dragging { cursor: grabbing; transition: opacity .6s ease, box-shadow .6s ease; }
.ch-stack-card__media {
  aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden;
  background: var(--panel-soft); border: 1px solid var(--panel-border);
}
.ch-stack-card__media img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; display: block; }
.ch-stack-card__body { padding: 0 6px; }
.ch-stack-card__row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-top: 18px; }
.ch-stack-card__row h3 { font-family: var(--heading-font); letter-spacing: -0.015em; font-weight: 600; color: var(--ink); font-size: 22px; margin: 0; }
.ch-stack-card__year { font-family: var(--mono-font); font-size: 12px; color: var(--muted); white-space: nowrap; }
.ch-stack-card__tags { font-size: 14px; color: var(--accent); margin-top: 5px; }

.ch-stack-ctrl { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 36px; }
.ch-stack-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--panel);
  backdrop-filter: blur(16px) saturate(1.6); -webkit-backdrop-filter: blur(16px) saturate(1.6);
  border: 1px solid var(--panel-border); color: var(--ink);
  font-size: 22px; line-height: 1; display: flex; align-items: center; justify-content: center;
  transition: transform .3s ease, border-color .3s ease, color .3s ease;
}
.ch-stack-btn:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }
.ch-dots { display: flex; align-items: center; gap: 9px; }
.ch-dot {
  width: 8px; height: 8px; padding: 0; border: none; border-radius: 980px;
  background: var(--divider); cursor: pointer;
  transition: width .3s ease, background .3s ease;
}
.ch-dot.is-active { width: 24px; background: var(--accent); }

@media (prefers-reduced-motion: reduce) { .ch-stack-card { transition: none; } }

/* WordPress admin bar offset */
.admin-bar .ch-header { top: 48px; }
@media screen and (max-width: 782px) { .admin-bar .ch-header { top: 62px; } }

/* ==========================================================================
   Mobile hamburger menu
   ========================================================================== */
.ch-burger {
  display: none;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--panel);
  backdrop-filter: blur(16px) saturate(1.6); -webkit-backdrop-filter: blur(16px) saturate(1.6);
  border: 1px solid var(--panel-border); color: var(--ink);
  flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  flex-shrink: 0; padding: 0;
}
.ch-burger span { display: block; width: 17px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s ease, opacity .2s ease; }
.ch-burger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.ch-burger.is-open span:nth-child(2) { opacity: 0; }
.ch-burger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .ch-header__inner { flex-wrap: nowrap; }
  .ch-burger { display: flex; }
  .ch-actions .ch-btn { display: none; }
  .ch-nav {
    display: none;
    position: absolute; top: calc(100% + 10px); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--panel);
    backdrop-filter: blur(26px) saturate(1.8); -webkit-backdrop-filter: blur(26px) saturate(1.8);
    border: 1px solid var(--panel-border); border-radius: 22px;
    padding: 12px 14px;
    box-shadow: 0 20px 44px rgba(32, 53, 44, 0.20), inset 0 1px 0 var(--panel-border);
  }
  .ch-nav.is-open { display: flex; }
  .ch-nav a { padding: 11px 10px; border-radius: 12px; font-size: 16px; }
  .ch-nav a:hover { background: var(--hairline); }
}

/* ==========================================================================
   Work: fan-out card stack (large landscape cards, image + title/desc)
   Vanilla recreation of the ruixen/21st.dev CardStack look.
   ========================================================================== */
.ch-fan-wrap { width: 100%; }
.ch-fan-track {
  position: relative; width: 100%; height: 400px;
  perspective: 1100px;
}
.ch-fan-card {
  position: absolute; bottom: 0; left: 50%;
  width: 520px; height: 320px;
  border-radius: 18px; overflow: hidden;
  border: 4px solid var(--panel-border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
  background: var(--panel-soft);
  transform-origin: center center;
  transition: transform .55s cubic-bezier(.2, .8, .2, 1), opacity .4s ease;
  will-change: transform;
  cursor: pointer; user-select: none; -webkit-user-select: none;
}
.ch-fan-card.is-active { cursor: grab; }
.ch-fan-card.is-dragging { cursor: grabbing; transition: none; }
.ch-fan-card__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ch-fan-card .ch-ph { position: absolute; inset: 0; }
.ch-fan-card__overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.62), rgba(0,0,0,0) 55%); pointer-events: none; }
.ch-fan-card__content { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px; z-index: 2; pointer-events: none; }
.ch-fan-card__title { font-family: var(--heading-font); font-weight: 600; letter-spacing: -0.01em; font-size: 20px; color: #fff; }
.ch-fan-card__desc { margin-top: 4px; font-size: 14px; line-height: 1.4; color: rgba(255, 255, 255, 0.82); }

.ch-fan-ctrl { margin-top: 26px; display: flex; align-items: center; justify-content: center; gap: 14px; }
.ch-fan-link { display: inline-flex; align-items: center; color: var(--muted); transition: color .3s ease; }
.ch-fan-link:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) { .ch-fan-card { transition: none; } }

/* ==========================================================================
   Projects archive card link + single project page
   ========================================================================== */
.ch-work-card--link { display: block; color: inherit; }
.ch-work-card--link:hover { color: inherit; }

.ch-single__media { border-radius: 22px; overflow: hidden; border: 1px solid var(--panel-border); margin-bottom: 36px; }
.ch-single__media img { width: 100%; height: auto; display: block; }
.ch-single__content { color: var(--body); font-size: 17px; line-height: 1.7; }
.ch-single__content > *:first-child { margin-top: 0; }
.ch-single__content p { margin: 0 0 18px; }
.ch-single__content h2, .ch-single__content h3 { font-family: var(--heading-font); color: var(--ink); letter-spacing: -0.015em; margin: 28px 0 12px; }
.ch-single__content a { color: var(--accent); }
.ch-single__content img { max-width: 100%; height: auto; border-radius: 12px; }
.ch-single__content ul, .ch-single__content ol { padding-left: 1.2em; margin: 0 0 18px; }
.ch-single__content li { margin: 0 0 8px; }
.ch-single__content blockquote { margin: 0 0 18px; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); color: var(--ink); font-family: var(--serif-font); font-size: 20px; }

/* ==========================================================================
   Custom logo (Appearance -> Customize -> Site Identity -> Logo)
   ========================================================================== */
.ch-logo--custom .custom-logo-link { display: inline-flex; align-items: center; }
.ch-logo--custom .custom-logo { max-height: 38px; width: auto; height: auto; display: block; }
.ch-footer__logo .custom-logo-link { display: inline-flex; align-items: center; }
.ch-footer__logo img.custom-logo { width: auto; height: auto; max-height: 40px; object-fit: contain; }

/* Force the header custom logo to a sane height (wins over base img rule) */
.ch-header .custom-logo { max-height: 40px !important; width: auto !important; height: auto !important; display: block; }
.ch-header .custom-logo-link { display: inline-flex !important; align-items: center; }

/* ==========================================================================
   Blog / Journal page
   ========================================================================== */
.ch-jr { position: relative; z-index: 1; max-width: 1220px; margin: 0 auto; padding: 0 34px; }
.ch-jr-hero { padding: 130px 0 20px; }
.ch-jr-title { font-family: var(--heading-font); letter-spacing: -0.03em; font-weight: 600; color: var(--ink); font-size: clamp(40px, 7vw, 88px); line-height: 0.98; margin: 8px 0 0; max-width: 16ch; }
.ch-jr-lead { font-size: clamp(17px, 1.8vw, 21px); color: var(--body); margin: 26px 0 0; max-width: 620px; line-height: 1.5; }

.ch-jr-featured-wrap { padding: 40px 0 20px; }
.ch-jr-featured { display: grid; grid-template-columns: 1.15fr 1fr; border-radius: 26px; overflow: hidden; background: var(--panel); backdrop-filter: blur(28px) saturate(1.7); -webkit-backdrop-filter: blur(28px) saturate(1.7); border: 1px solid var(--panel-border); box-shadow: inset 0 1px 0 var(--panel-border), 0 20px 50px rgba(32, 53, 44, 0.12); color: inherit; transition: box-shadow .5s ease; }
.ch-jr-featured:hover { box-shadow: 0 30px 60px rgba(32, 53, 44, 0.2); color: inherit; }
.ch-jr-featured__media { position: relative; min-height: 320px; background: var(--panel-soft); }
.ch-jr-featured__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ch-jr-featured__media .ch-ph { position: absolute; inset: 0; }
.ch-jr-featured__body { padding: 40px; display: flex; flex-direction: column; justify-content: center; }
.ch-jr-featured__meta { display: flex; align-items: center; gap: 12px; font-family: var(--mono-font); font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); margin-bottom: 18px; }
.ch-jr-featured__meta .m { color: var(--muted); }
.ch-jr-featured__body h2 { font-family: var(--heading-font); letter-spacing: -0.02em; font-weight: 600; color: var(--ink); font-size: clamp(26px, 3vw, 40px); line-height: 1.08; margin: 0; }
.ch-jr-featured__body p { font-size: 16px; color: var(--body); margin: 16px 0 24px; line-height: 1.55; }
.ch-jr-featured__by { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
@media (max-width: 760px) { .ch-jr-featured { grid-template-columns: 1fr; } .ch-jr-featured__media { min-height: 220px; aspect-ratio: 16/10; } .ch-jr-featured__body { padding: 30px 26px; } }

.ch-jr-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 34px 0 6px; }
.ch-jr-pill { padding: 9px 20px; border-radius: 980px; font-size: 14px; font-weight: 500; border: 1px solid var(--panel-border); background: var(--panel); color: var(--ink); backdrop-filter: blur(14px) saturate(1.5); -webkit-backdrop-filter: blur(14px) saturate(1.5); transition: transform .25s ease, background .25s ease, color .25s ease; }
.ch-jr-pill:hover { transform: translateY(-2px); }
.ch-jr-pill span { opacity: 0.55; font-size: 12px; }
.ch-jr-pill.is-active { background: var(--accent); color: #F6F1E9; border-color: var(--accent); }
.ch-jr-pill.is-active span { opacity: 0.8; }

.ch-jr-grid-wrap { padding: 22px 0 20px; }
.ch-jr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 26px; }
.ch-jr-card { color: inherit; display: block; }
.ch-jr-card:hover { color: inherit; }
.ch-jr-card__media { position: relative; aspect-ratio: 16 / 10; border-radius: 22px; overflow: hidden; background: var(--panel-soft); border: 1px solid var(--panel-border); box-shadow: inset 0 1px 0 var(--panel-border); transition: box-shadow .5s ease, transform .5s ease; }
.ch-jr-card:hover .ch-jr-card__media { box-shadow: 0 28px 54px rgba(32, 53, 44, 0.18); transform: translateY(-4px); }
.ch-jr-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ch-jr-card__media .ch-ph { position: absolute; inset: 0; }
.ch-jr-card__badge { position: absolute; top: 14px; left: 14px; padding: 5px 12px; border-radius: 980px; background: var(--panel); backdrop-filter: blur(14px) saturate(1.6); -webkit-backdrop-filter: blur(14px) saturate(1.6); border: 1px solid var(--panel-border); font-family: var(--mono-font); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink); }
.ch-jr-card__meta { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-family: var(--mono-font); font-size: 12px; color: var(--muted); }
.ch-jr-card h3 { font-family: var(--heading-font); letter-spacing: -0.015em; font-weight: 600; color: var(--ink); font-size: 22px; margin: 8px 0 0; line-height: 1.15; }
.ch-jr-card p { font-size: 14.5px; color: var(--body); margin: 10px 0 0; line-height: 1.55; }
.ch-jr-hidden { display: none !important; }

.ch-jr-pager { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 52px; }
.ch-jr-pager button { min-width: 42px; height: 42px; padding: 0 16px; border-radius: 980px; font-size: 14px; font-weight: 500; border: 1px solid var(--panel-border); background: var(--panel); color: var(--ink); backdrop-filter: blur(14px) saturate(1.5); -webkit-backdrop-filter: blur(14px) saturate(1.5); transition: transform .25s ease; }
.ch-jr-pager button:hover { transform: translateY(-2px); }
.ch-jr-pager button.ch-jr-page { width: 42px; padding: 0; border-radius: 50%; font-weight: 600; }
.ch-jr-pager button.is-active { background: var(--accent); color: #F6F1E9; border-color: var(--accent); }
.ch-jr-pager button[disabled] { color: var(--muted); cursor: default; }
.ch-jr-pager button[disabled]:hover { transform: none; }

.ch-jr-news-wrap { padding: 40px 0 110px; }
.ch-jr-news { border-radius: 28px; padding: 56px 40px; text-align: center; background: var(--panel); backdrop-filter: blur(28px) saturate(1.7); -webkit-backdrop-filter: blur(28px) saturate(1.7); border: 1px solid var(--panel-border); box-shadow: inset 0 1px 0 var(--panel-border), 0 20px 50px rgba(32, 53, 44, 0.12); }
.ch-jr-news h2 { font-family: var(--heading-font); letter-spacing: -0.025em; font-weight: 600; color: var(--ink); font-size: clamp(28px, 3.6vw, 44px); margin: 0 auto; max-width: 18ch; }
.ch-jr-news p { font-size: 16px; color: var(--body); margin: 16px auto 28px; max-width: 480px; }
.ch-jr-subscribe { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; max-width: 460px; margin: 0 auto; }
.ch-jr-subscribe input { flex: 1 1 220px; padding: 14px 18px; border: 1px solid var(--panel-border); border-radius: 980px; background: var(--panel); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 15px; color: var(--base); }
.ch-jr-subscribe input:focus { border-color: var(--accent); outline: none; }
.ch-jr-subscribe button { background: var(--accent); color: #F6F1E9; border: none; padding: 14px 28px; border-radius: 980px; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; box-shadow: 0 12px 28px rgba(184, 110, 65, 0.3), inset 0 1px 0 var(--panel); transition: transform .3s ease; }
.ch-jr-subscribe button:hover { transform: translateY(-2px); }
