/*
Theme Name: Dev Adhikari
Theme URI: https://devadhikari.com.np/
Author: Dev Adhikari
Author URI: https://devadhikari.com.np/
Description: A modern, dark editorial WordPress theme for Dev Adhikari — speaker and mentor working on memory, learning and child psychology. Built from the original devadhikari.com.np design.
Version: 1.0.0
Requires at least: 6.0
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: devadhikari
*/

/* =========================================================
   Dev Adhikari — Design tokens
   Palette: ink navy bg, warm gold accent, soft teal accent
   Type: Fraunces (display, editorial serif) + Plus Jakarta Sans (body/UI)
   ========================================================= */
:root {
  --bg: #ffffff;
  --bg-alt: #f4f5f8;
  --card: #ffffff;
  --card-hover: #f1f3f6;
  --line: rgba(0, 0, 0, 0.1);
  --line-strong: rgba(0, 0, 0, 0.2);

  --cream: #141a31; /* Re-purposed as dark text in light mode */
  --muted: #4b5563;
  --muted-2: #6b7280;

  --primary: #5f379b;
  --secondary: #044f9b;
  --secondary-soft: #2563eb;

  --font-display: "Fraunces", "Mukta Scaled", "Mukta", Georgia, serif;
  --font-body: "Plus Jakarta Sans", "Mukta Scaled", "Mukta", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-nepali: "Mukta Scaled", "Mukta", "Plus Jakarta Sans", sans-serif;

  --container: 1180px;
  --radius: 18px;
  --radius-sm: 10px;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --glass-bg: rgba(255, 255, 255, 0.85);
}

[data-theme="dark"] {
  --bg: #10142a;
  --bg-alt: #171c3a;
  --card: #1c2246;
  --card-hover: #232a55;
  --line: rgba(244, 240, 230, 0.10);
  --line-strong: rgba(244, 240, 230, 0.18);

  --cream: #f4f0e6;
  --muted: #a7acc9;
  --muted-2: #7d82a3;

  /* Keep the new primary and secondary, but slightly adapted if necessary for contrast */
  --primary: #8a5cd6; /* lighter purple for dark mode visibility */
  --secondary: #3b82f6; /* lighter blue for dark mode visibility */
  --secondary-soft: #60a5fa;
  --glass-bg: rgba(16, 20, 42, 0.85);
}

/*
 * Automatically apply Mukta (scaled up) to any Devanagari (Nepali) text on the site.
 * size-adjust makes the Nepali font slightly larger than the English font.
 */
@font-face {
  font-family: "Mukta Scaled";
  src: local("Mukta"), url("https://fonts.gstatic.com/s/mukta/v14/iJWHBXyXfDDVXbnBr5Q.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
  size-adjust: 112.5%; /* Increases Nepali font size by roughly +2px relative to 16px base text */
}

/* Explicit utility class for intentional Nepali content blocks */
.lang-ne,
[lang="ne"],
[lang="ne-NP"] {
  font-family: var(--font-nepali);
  line-height: 1.7;
}


*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
li {
  list-style: none;
  margin: 0;
  padding: 0;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

/* subtle grain overlay for warmth/texture */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: .035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection {
  background: var(--secondary);
  color: var(--bg);
}

/* focus visibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  transition: transform .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}

.btn-primary {
  background: var(--secondary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--secondary-soft);
  transform: translateY(-2px);
}

.btn-outline {
  border-color: var(--line-strong);
  color: var(--cream);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--cream);
  padding: 10px 20px;
  font-size: .88rem;
}

.btn-ghost:hover {
  border-color: var(--secondary);
  color: var(--secondary);
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  background: var(--glass-bg);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
  transition: background .3s var(--ease);
}

.admin-bar .site-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 80px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 8px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.2;
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--muted);
  font-family: var(--font-body);
  margin-top: 2px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  flex: 1;
  justify-content: center;
}

.main-nav a {
  font-size: .92rem;
  color: var(--muted);
  font-weight: 500;
  transition: color .2s;
  position: relative;
}

.main-nav a:hover {
  color: var(--cream);
}

.main-nav a::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--secondary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s var(--ease);
}

.main-nav a:hover::before {
  transform: scaleX(1);
}

/* ── Parent items with children: show a "+" after the label ── */
.main-nav .menu-item-has-children>a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* SVG Chevron icon on the right */
.main-nav .menu-item-has-children>a::after {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  background-color: var(--primary);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  transition: background-color .2s, transform .25s var(--ease);
  pointer-events: none;
}

/* When open: flip caret up and turn gold */
.main-nav .menu-item-has-children.open>a::after {
  background-color: var(--secondary);
  transform: rotate(180deg);
}

/* ── Sub-menu dropdown ── */
.main-nav .menu-item-has-children {
  position: relative;
}

.main-nav .sub-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 8px;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .38);
  z-index: 600;
  list-style: none;
  margin: 0;
}

/* Arrow tip pointing up */
.main-nav .sub-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  background: var(--card);
  border-left: 1px solid var(--line-strong);
  border-top: 1px solid var(--line-strong);
  rotate: 45deg;
}

.main-nav .menu-item-has-children.open>.sub-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.main-nav .sub-menu li a {
  display: block;
  padding: 9px 14px;
  font-size: .88rem;
  color: var(--muted);
  border-radius: 6px;
  transition: background .18s, color .18s;
  white-space: nowrap;
}

/* Sub-menu links don't need the bottom underline */
.main-nav .sub-menu li a::after {
  display: none;
}

.main-nav .sub-menu li a::before {
  display: none;
}

.main-nav .sub-menu li a:hover {
  background: rgba(95, 199, 184, .08);
  color: var(--cream);
}



.nav-more {
  position: relative;
}

.nav-more-btn {
  background: none;
  border: none;
  color: var(--muted);
  font: inherit;
  font-size: .92rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
}

.nav-more-btn:hover {
  color: var(--cream);
}

.caret {
  font-size: .75em;
  transition: transform .2s;
}

.nav-more.open .caret {
  transform: rotate(180deg);
}

.nav-more-menu {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 8px;
  min-width: 190px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .35);
}

.nav-more.open .nav-more-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-more-menu a {
  display: block;
  padding: 9px 12px;
  font-size: .88rem;
  color: var(--muted);
  border-radius: 6px;
}

.nav-more-menu a:hover {
  background: var(--card-hover);
  color: var(--cream);
}

.header-actions-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
}

.theme-toggle {
  background: var(--card);
  border: 1px solid var(--line-strong);
  color: var(--muted);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s, color .2s, transform .2s;
  padding: 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.theme-toggle-mobile {
  display: none;
}

.theme-toggle:hover {
  background: var(--card-hover);
  color: var(--primary);
  transform: translateY(-2px);
}

/* Hide sun by default (Light Mode) */
.theme-toggle .sun-icon { display: none; }
.theme-toggle .moon-icon { display: block; }

/* Show sun in Dark Mode */
[data-theme="dark"] .theme-toggle .sun-icon { display: block; }
[data-theme="dark"] .theme-toggle .moon-icon { display: none; }

.header-cta {
  white-space: nowrap;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: none;
  border: none;
  padding: 0;
  margin-left: auto;
}

.hamburger span {
  width: 100%;
  height: 2px;
  background: var(--cream);
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 0 80px;
  overflow: hidden;
  background:
    radial-gradient(60% 55% at 82% 18%, rgba(95, 199, 184, .14), transparent 60%),
    radial-gradient(70% 60% at 10% 90%, rgba(232, 169, 74, .14), transparent 60%),
    var(--bg);
}

.synapse-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: .55;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 60px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--secondary-soft);
  font-weight: 600;
  margin: 0 0 22px;
}

.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--secondary);
  box-shadow: 0 0 0 4px rgba(232, 169, 74, .18);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 4.6vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 22px;
}

.hero-title em {
  font-style: italic;
  color: var(--secondary);
  font-weight: 450;
}

.hero-sub {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 480px;
  margin: 0 0 34px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 52px;
}

.hero-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--primary);
}

.stat-label {
  display: block;
  font-size: .82rem;
  color: var(--muted-2);
  margin-top: 4px;
  max-width: 140px;
}

.hero-figure {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 400px;
}

.figure-ring {
  position: absolute;
  inset: -18px;
  border: 1px dashed var(--line-strong);
  border-radius: 32px;
  animation: spin 34s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.figure-img {
  border-radius: 26px;
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .6);
  position: relative;
  z-index: 1;
}

.figure-quote {
  position: absolute;
  left: -34px;
  bottom: 26px;
  z-index: 2;
  background: var(--card);
  border: 1px solid var(--line-strong);
  padding: 14px 18px;
  border-radius: 14px 14px 14px 4px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: .95rem;
  max-width: 210px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .4);
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 35px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: .85rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: #6d7f92;
  font-weight: 500;
  z-index: 1;
}

.scroll-cue .mouse-icon {
  width: 26px;
  height: 40px;
  border: 2px solid #6d7f92;
  border-radius: 20px;
  position: relative;
  display: flex;
  justify-content: center;
}

.scroll-cue .mouse-icon::before {
  content: '';
  width: 4px;
  height: 8px;
  background-color: var(--primary);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  animation: scrollWheel 2s ease-in-out infinite;
}

@keyframes scrollWheel {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(14px); opacity: 0; }
}

/* =========================================================
   Section shared
   ========================================================= */
section {
  padding: 120px 0;
  position: relative;
}

.section-eyebrow {
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
  margin: 0 0 14px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.2vw, 2.7rem);
  line-height: 1.15;
  margin: 0 0 20px;
  max-width: 640px;
}

.section-lede {
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 20px;
}

.center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* =========================================================
   About
   ========================================================= */
.about {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.about-inner {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 70px;
  align-items: center;
}

.about-media img {
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
}

.about-copy p {
  color: var(--muted);
  margin: 0 0 18px;
  text-align: justify;
}

.about-copy em {
  color: var(--cream);
  font-style: italic;
}

/* =========================================================
   Pillars
   ========================================================= */
.pillar-grid {
  margin-top: 60px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.pillar-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}

.pillar-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  background: var(--card-hover);
}

.pillar-media {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid var(--line);
}

.pillar-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}

.pillar-card:hover .pillar-media img {
  transform: scale(1.06);
}

.pillar-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 0 0 10px;
}

.pillar-card p {
  color: var(--muted);
  font-size: .94rem;
  margin: 0 0 18px;
}

.pillar-link {
  font-size: .86rem;
  font-weight: 600;
  color: var(--secondary-soft);
}

.pillar-link:hover {
  color: var(--secondary);
}

/* =========================================================
   Gallery
   ========================================================= */
.gallery {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.gallery-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 190px;
  gap: 14px;
}

.gallery-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  cursor: zoom-in;
}

.gallery-item.span-2 {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease), filter .4s;
}

.gallery-item:hover img {
  transform: scale(1.07);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(8, 10, 22, .92);
  backdrop-filter: blur(6px);
  padding: 40px;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 86vh;
  border-radius: 12px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, .6);
}

.lightbox-close {
  position: absolute;
  top: 26px;
  right: 34px;
  background: none;
  border: none;
  color: var(--cream);
  font-size: 2.2rem;
  line-height: 1;
}

.lightbox-close:hover {
  color: var(--secondary);
}

/* =========================================================
   Media / YouTube
   ========================================================= */
.media-inner {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 60px;
  align-items: center;
}

.media-copy p {
  color: var(--muted);
  margin: 0 0 28px;
  max-width: 480px;
}

.media-card {
  background: linear-gradient(160deg, var(--card), var(--bg-alt));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 26px;
}

.media-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.media-card-top img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: contain;
  background: #fff1;
  padding: 6px;
}

.media-card-name {
  margin: 0;
  font-weight: 700;
}

.media-card-role {
  margin: 0;
  font-size: .82rem;
  color: var(--muted-2);
}

.media-card-play {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(0, 0, 0, .25);
  border-radius: var(--radius-sm);
  padding: 22px;
  border: 1px solid var(--line);
}

.play-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--secondary);
  color: #201203;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  flex-shrink: 0;
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: var(--bg);
  padding-top: 90px;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 30px;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--line);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.footer-brand .custom-logo {
  width: 46px;
  height: auto;
  border-radius: 10px;
}

.footer-brand img {
  max-width: 100%;
  height: auto;
}

[data-theme="dark"] .footer-brand .widget,
[data-theme="dark"] .footer-brand > div[style*="display: flex"] {
  background: #ffffff;
  padding: 12px;
  border-radius: 10px;
}

.footer-brand p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.footer-brand span {
  font-family: var(--font-body);
  font-size: .82rem;
  color: var(--muted-2);
}

.footer-widget-2,
.footer-contact,
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 981px) {
  .footer-contact {
    margin-left: 40px;
  }
}

.footer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link,
.footer-menu a {
  color: var(--muted);
  font-size: .95rem;
  text-decoration: none;
  transition: color .2s var(--ease);
}

.footer-link:hover,
.footer-menu a:hover {
  color: var(--primary);
}

.footer-social {
  text-align: center;
  width: 100%;
}

.social-row {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, border-color .2s, transform .2s;
}

.social-icon svg {
  width: 18px;
  height: 18px;
  fill: var(--muted);
  transition: fill .2s;
}

.social-icon:hover {
  background: var(--secondary);
  border-color: var(--secondary);
  transform: translateY(-3px);
}

.social-icon:hover svg {
  fill: #ffffff;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 28px;
  font-size: .82rem;
  color: var(--muted-2);
}

.footer-bottom p {
  margin: 0;
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 99;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(138, 92, 214, 0.4);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top svg {
  transition: transform 0.3s var(--ease);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--secondary);
  color: #ffffff;
  transform: translateY(-6px) scale(1.05);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.5);
}

.back-to-top:hover svg {
  transform: translateY(-3px);
}

/* =========================================================
   Reveal on scroll
   ========================================================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

[data-reveal].in {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 980px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-figure {
    order: -1;
    max-width: 320px;
  }

  .about-inner {
    grid-template-columns: 1fr;
  }

  .about-media {
    order: -1;
  }

  .media-inner {
    grid-template-columns: 1fr;
  }

  .pillar-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 760px) {

  .main-nav,
  .header-cta {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .theme-toggle-desktop {
    display: none;
  }

  .theme-toggle-mobile {
    display: flex;
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 9999;
    opacity: 0.85;
    transition: opacity 0.3s ease, background 0.2s, color 0.2s, transform 0.2s;
  }

  .theme-toggle:active {
    opacity: 1;
  }

  .site-header.nav-open .main-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--line);
    padding: 18px 28px 26px;
  }

  /* WordPress .sub-menu mobile accordion style */
  .site-header.nav-open .main-nav .sub-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    display: none;
    width: 100%;
    margin: 8px 0 0 16px;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0;
  }

  .site-header.nav-open .main-nav .menu-item-has-children.open>.sub-menu {
    display: block;
  }

  .site-header.nav-open .main-nav .sub-menu::before {
    display: none;
    /* Hide the popup arrow on mobile */
  }

  .pillar-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px;
  }

  .gallery-item.span-2 {
    grid-column: span 2;
    grid-row: span 1;
  }

  section {
    padding: 80px 0;
  }

  .figure-quote {
    left: 0;
  }
}

/* =========================================================
   WordPress — nav menu (wp_nav_menu output + submenus)
   ========================================================= */
.main-nav ul.menu {
  display: flex;
  align-items: center;
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav li {
  position: relative;
}

.main-nav>ul.menu>li>a {
  font-size: .92rem;
  color: var(--muted);
  font-weight: 500;
  padding: 6px 0;
  display: inline-block;
  transition: color .2s;
}

.main-nav>ul.menu>li>a:hover {
  color: var(--cream);
}

.main-nav li.menu-item-has-children>a::after {
  content: "▾";
  font-size: .68em;
  margin-left: 5px;
  opacity: .7;
}

.main-nav .sub-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  min-width: 190px;
  z-index: 50;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 8px;
  list-style: none;
  margin: 0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
}

/* Hover removed, submenu only opens via click class */
.main-nav li.sub-menu-open>.sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.main-nav .sub-menu a {
  display: block;
  padding: 9px 12px;
  font-size: .88rem;
  color: var(--muted);
  border-radius: 6px;
}

.main-nav .sub-menu a:hover {
  background: var(--card-hover);
  color: var(--cream);
}

.main-nav .current-menu-item>a {
  color: var(--secondary-soft);
}

.brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .85rem;
  flex-shrink: 0;
}

.custom-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 8px;
}

.footer-brand .custom-logo,
.footer-brand .brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 10px;
}

@media (max-width:760px) {
  .main-nav ul.menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
  }

  .main-nav .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    display: none;
    margin: 4px 0 6px 8px;
    background: transparent;
    border: none;
    padding: 0;
  }

  .main-nav li.sub-menu-open>.sub-menu {
    display: block;
  }
}

/* =========================================================
   WordPress — post grid (index / archive / search)
   ========================================================= */
.archive-wrap {
  padding: 160px 28px 100px;
  max-width: var(--container);
  margin: 0 auto;
}

.archive-header {
  margin-bottom: 60px;
}

.archive-header .section-title span {
  color: var(--secondary);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.post-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}

.post-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  background: var(--card-hover);
}

.post-card-media {
  display: block;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.post-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}

.post-card:hover .post-card-media img {
  transform: scale(1.06);
}

.post-card-body {
  padding: 24px;
}

.post-meta {
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 0 0 10px;
}

.post-card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 0 0 10px;
}

.post-card-title a:hover {
  color: var(--secondary);
}

.post-card-excerpt {
  color: var(--muted);
  font-size: .92rem;
  margin: 0 0 16px;
}

.no-posts {
  color: var(--muted);
  text-align: center;
  grid-column: 1/-1;
  padding: 40px 0;
}

/* =========================================================
   WordPress — pagination & post navigation
   ========================================================= */
.navigation.pagination {
  margin-top: 56px;
}

.pagination .nav-links {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pagination .page-numbers {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: .9rem;
}

.pagination .page-numbers.current {
  background: var(--secondary);
  color: #ffffff;
  border-color: var(--secondary);
}

.pagination .page-numbers:hover {
  border-color: var(--secondary);
  color: var(--secondary);
}

.navigation.post-navigation {
  margin-top: 50px;
  border-top: 1px solid var(--line);
  padding-top: 30px;
}

.post-navigation .nav-links {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.post-navigation a {
  color: var(--muted);
  font-weight: 600;
  max-width: 280px;
}

.post-navigation a:hover {
  color: var(--secondary);
}

.post-navigation .nav-next {
  text-align: right;
  margin-left: auto;
}

/* =========================================================
   WordPress — single post / page
   ========================================================= */
.single-wrap {
  padding: 160px 28px 100px;
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 60px;
  align-items: start;
}

.single-wrap:has(.single-main:only-child) {
  grid-template-columns: 1fr;
}

.single-main {
  min-width: 0;
}

@media (min-width: 981px) {
  .single-main,
  .sidebar-area {
    position: sticky;
    top: 100px;
  }
}

@media (min-width: 981px) {
  .single-wrap:has(aside) .single-main {
    border-right: 1px solid var(--line);
    padding-right: 50px;
  }
}

.single-header {
  margin-bottom: 34px;
}

.entry-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  margin: 10px 0 14px;
}

.single-media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  margin-bottom: 40px;
}

.single-media img {
  width: 100%;
  height: auto;
  display: block;
}

@media screen and (max-width: 782px) {
  .single-media img {
    max-height: 280px;
    object-fit: cover;
  }
}

.entry-content {
  color: var(--muted);
  font-size: 1.05rem;
  text-align: justify;
}

.entry-content>* {
  margin-bottom: 22px;
}

.entry-content h2 {
  font-family: var(--font-display);
  color: var(--cream);
  font-size: 1.6rem;
  margin-top: 44px;
}

.entry-content h3 {
  font-family: var(--font-display);
  color: var(--cream);
  font-size: 1.3rem;
  margin-top: 36px;
}

.entry-content a {
  color: var(--secondary-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entry-content a:hover {
  color: var(--secondary);
}

.entry-content img {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
}

.entry-content blockquote {
  border-left: 3px solid var(--secondary);
  padding: 6px 0 6px 22px;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--cream);
}

.entry-content ul,
.entry-content ol {
  padding-left: 22px;
}

.entry-content li {
  margin-bottom: 8px;
}

.entry-content code {
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .9em;
}

.post-tags {
  margin-top: 30px;
  color: var(--muted-2);
  font-size: .88rem;
}

.post-tags a {
  color: var(--primary);
}

.page-links {
  margin-top: 20px;
  color: var(--muted);
}

/* =========================================================
   WordPress — sidebar / widgets (widget.php)
   ========================================================= */
.site-sidebar {
  display: flex;
  flex-direction: column;
  gap: 34px;
}

.widget {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.sidebar-area {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-area .widget {
  background: transparent;
  border: none;
  padding: 0;
}

.sidebar-area img {
  width: 100%;
  height: auto;
  display: block;
}

.widget-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 16px;
  color: var(--cream);
}

.widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.widget a {
  color: var(--muted);
  font-size: .92rem;
}

.widget a:hover {
  color: var(--secondary);
}

.widget select,
.widget input:not([type="submit"]) {
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid var(--line-strong);
  color: var(--cream);
  padding: 10px 12px;
  border-radius: 8px;
  font-family: inherit;
}

/* =========================================================
   WordPress — search form
   ========================================================= */
.search-form {
  display: flex;
  gap: 10px;
  max-width: 480px;
  margin: 0 auto 10px;
}

.search-form .search-field {
  flex: 1;
  background: var(--bg-alt);
  border: 1px solid var(--line-strong);
  color: var(--cream);
  padding: 12px 16px;
  border-radius: 999px;
  font-family: inherit;
  font-size: .95rem;
}

.search-form .search-field:focus {
  outline: none;
  border-color: var(--secondary);
}

.search-form .search-submit {
  background: var(--secondary);
  color: #201203;
  border: none;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}

.search-form .search-submit:hover {
  background: var(--secondary-soft);
}

/* =========================================================
   WordPress — comments
   ========================================================= */
.comments-area {
  margin-top: 56px;
  border-top: 1px solid var(--line);
  padding-top: 40px;
}

.comments-title,
.comment-reply-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin: 0 0 24px;
}

.comment-list {
  list-style: none;
  margin: 0 0 30px;
  padding: 0;
}

.comment-list .comment {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.comment-list .children {
  list-style: none;
  margin: 0;
  padding-left: 36px;
}

.comment-author .fn {
  font-weight: 700;
  font-style: normal;
  color: var(--cream);
}

.comment-metadata {
  font-size: .78rem;
  color: var(--muted-2);
  margin-bottom: 8px;
}

.comment-metadata a {
  color: var(--muted-2);
}

.comment-content p {
  color: var(--muted);
  margin: 8px 0;
}

.comment-reply-link {
  font-size: .82rem;
  color: var(--primary);
  font-weight: 600;
}

.comment-form label {
  display: block;
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid var(--line-strong);
  color: var(--cream);
  padding: 12px 14px;
  border-radius: 10px;
  font-family: inherit;
  margin-bottom: 18px;
}

.comment-form textarea {
  min-height: 130px;
  resize: vertical;
}

.comment-form .form-submit input {
  background: var(--secondary);
  color: #ffffff;
  border: none;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}

.comment-form .form-submit input:hover {
  background: var(--secondary-soft);
}

/* =========================================================
   WordPress — 404
   ========================================================= */
.error-404 {
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding: 160px 0 100px;
}

.error-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.error-inner .search-form {
  margin-top: 10px;
}

@media (max-width: 980px) {
  .single-wrap {
    grid-template-columns: 1fr;
  }

  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .post-grid {
    grid-template-columns: 1fr;
  }

  .archive-wrap,
  .single-wrap {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 768px) {
  .header-inner {
    height: 66px;
  }
}

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr !important;
  }
  .footer-brand, .footer-widget-2 {
    grid-column: span 2;
  }
  .footer-contact, .footer-links {
    grid-column: span 1;
  }
}
