/*
Theme Name:  Matica Personal
Theme URI:   https://matica.themes/personal
Author:      Matica Themes
Author URI:  https://matica.themes
Description: Matica Personal is an elegant, fully customizable WordPress theme for personal brands, freelancers, consultants, and creative professionals. Features a warm editorial design system with Playfair Display headings, a live Customizer color palette, per-page layout controls, four page templates, and multiple section style variants. Part of the Matica Theme Collection.
Version:     1.0.0
Requires at least: 6.0
Requires PHP: 8.0
Tested up to: 6.7
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: matica-personal
Tags:        portfolio, blog, custom-colors, custom-logo, custom-menu, custom-header, editor-style, featured-images, full-width-template, responsive-layout, theme-options, translation-ready, accessibility-ready
*/

/* ==========================================================================
   TABLE OF CONTENTS
   1.  Design Tokens (CSS Custom Properties)
   2.  Reset & Base
   3.  Typography
   4.  Layout — Container & Grid
   5.  Utilities
   6.  Header & Navigation
   7.  Mobile Navigation
   8.  Hero Sections
   9.  Sections & Cards
   10. Portfolio
   11. Services
   12. Stats
   13. Testimonials
   14. About
   15. Blog Preview & Archive Cards
   16. CTA
   17. Contact Form
   18. Footer
   19. Single Post / Page
   20. Sidebar
   21. Comments
   22. 404
   23. Page Templates
   24. Animations & Utilities
   25. Responsive
   ========================================================================== */

/* ==========================================================================
   1. Design Tokens
   NOTE: These base tokens are overridden at runtime by dynamic-css.php
   which generates custom property declarations from Customizer settings.
   ========================================================================== */

:root {
  /* --- Matica Palette (overridden by Customizer) --- */
  --mp-color-1: #b08968;   /* accent / primary */
  --mp-color-2: #8c6844;   /* accent dark / hover */
  --mp-color-3: #2a2724;   /* text primary */
  --mp-color-4: #9b9087;   /* text muted */
  --mp-color-5: #e8e2db;   /* border / divider */
  --mp-color-6: #f7f3ee;   /* background warm */
  --mp-color-7: #fefefe;   /* surface white */
  --mp-color-8: #0f0e0d;   /* deep dark */

  /* --- Semantic aliases (always derived, never directly Customizer-set) --- */
  --mp-bg:            var(--mp-color-6);
  --mp-surface:       var(--mp-color-7);
  --mp-text:          var(--mp-color-3);
  --mp-text-muted:    var(--mp-color-4);
  --mp-accent:        var(--mp-color-1);
  --mp-accent-hover:  var(--mp-color-2);
  --mp-border:        var(--mp-color-5);
  --mp-dark:          var(--mp-color-8);

  /* --- Typography tokens (overridden by Customizer) --- */
  --mp-font-heading:  'Playfair Display', Georgia, serif;
  --mp-font-body:     'DM Sans', system-ui, sans-serif;
  --mp-font-mono:     'DM Mono', 'Menlo', monospace;

  --mp-text-xs:   0.75rem;
  --mp-text-sm:   0.875rem;
  --mp-text-base: 1rem;
  --mp-text-lg:   1.125rem;
  --mp-text-xl:   1.25rem;
  --mp-text-2xl:  1.5rem;
  --mp-text-3xl:  1.875rem;
  --mp-text-4xl:  2.25rem;
  --mp-text-5xl:  3rem;
  --mp-text-6xl:  3.75rem;

  --mp-leading-tight:  1.25;
  --mp-leading-snug:   1.375;
  --mp-leading-normal: 1.6;
  --mp-leading-loose:  1.85;

  /* --- Layout tokens (overridden by Customizer) --- */
  --mp-container:      1200px;
  --mp-container-narrow: 720px;
  --mp-edge-spacing:   5vw;
  --mp-section-gap:    6rem;
  --mp-section-gap-sm: 4rem;

  /* --- Spacing scale --- */
  --mp-sp-1:  0.25rem;
  --mp-sp-2:  0.5rem;
  --mp-sp-3:  0.75rem;
  --mp-sp-4:  1rem;
  --mp-sp-5:  1.25rem;
  --mp-sp-6:  1.5rem;
  --mp-sp-8:  2rem;
  --mp-sp-10: 2.5rem;
  --mp-sp-12: 3rem;
  --mp-sp-16: 4rem;
  --mp-sp-20: 5rem;
  --mp-sp-24: 6rem;

  /* --- Radii --- */
  --mp-radius-sm: 4px;
  --mp-radius:    8px;
  --mp-radius-lg: 16px;
  --mp-radius-xl: 24px;
  --mp-radius-full: 999px;

  /* --- Shadows --- */
  --mp-shadow-sm:  0 1px 3px rgba(42,39,36,0.07);
  --mp-shadow:     0 4px 16px rgba(42,39,36,0.1);
  --mp-shadow-lg:  0 12px 40px rgba(42,39,36,0.13);
  --mp-shadow-xl:  0 24px 64px rgba(42,39,36,0.16);

  /* --- Transitions --- */
  --mp-transition: 0.2s ease;
  --mp-transition-slow: 0.4s ease;

  /* --- Header height (used for scroll-offset calculations) --- */
  --mp-header-h: 72px;
}

/* Dark canvas mode (applied via body.mp-canvas or section.mp-dark) */
.mp-dark,
.mp-section--dark {
  --mp-bg:         var(--mp-color-8);
  --mp-surface:    #1c1a18;
  --mp-text:       var(--mp-color-6);
  --mp-text-muted: var(--mp-color-4);
  --mp-border:     rgba(255,255,255,0.1);
  --mp-shadow:     0 4px 16px rgba(0,0,0,0.3);
}

/* ==========================================================================
   2. Reset & Base
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--mp-font-body);
  font-size: var(--mp-text-base);
  line-height: var(--mp-leading-normal);
  color: var(--mp-text);
  background-color: var(--mp-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Screen-reader only */
.screen-reader-text {
  clip: rect(1px,1px,1px,1px);
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  white-space: nowrap;
}
.screen-reader-text:focus {
  clip: auto !important;
  background: var(--mp-surface);
  border-radius: var(--mp-radius-sm);
  display: block;
  font-size: var(--mp-text-sm);
  font-weight: 700;
  height: auto; width: auto;
  left: 5px; top: 5px;
  padding: 15px 23px;
  z-index: 100000;
}

/* Skip link */
.skip-link { position: absolute; top: -100%; left: 6px; z-index: 99999; }
.skip-link:focus { top: 6px; }

img, video { max-width: 100%; height: auto; display: block; }
svg { display: block; }

a { color: var(--mp-accent); text-decoration: none; transition: color var(--mp-transition); }
a:hover { color: var(--mp-accent-hover); }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--mp-accent); outline-offset: 3px; }

/* ==========================================================================
   3. Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--mp-font-heading);
  line-height: var(--mp-leading-tight);
  color: var(--mp-text);
  font-weight: 700;
}

h1 { font-size: clamp(2.25rem, 5vw, var(--mp-text-6xl)); font-weight: 400; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3.5vw, var(--mp-text-5xl)); font-weight: 400; letter-spacing: -0.015em; }
h3 { font-size: clamp(1.25rem, 2.5vw, var(--mp-text-3xl)); font-family: var(--mp-font-body); font-weight: 700; }
h4 { font-size: var(--mp-text-xl); font-family: var(--mp-font-body); font-weight: 600; }
h5 { font-size: var(--mp-text-lg); font-family: var(--mp-font-body); font-weight: 600; }
h6 { font-size: var(--mp-text-base); font-family: var(--mp-font-body); font-weight: 700; }

p { margin-bottom: 1.25em; max-width: 70ch; }
p:last-child { margin-bottom: 0; }

blockquote {
  border-left: 3px solid var(--mp-accent);
  padding: var(--mp-sp-4) var(--mp-sp-6);
  margin: var(--mp-sp-6) 0;
  font-family: var(--mp-font-heading);
  font-size: var(--mp-text-xl);
  font-style: italic;
  color: var(--mp-text);
}
blockquote cite { display: block; font-size: var(--mp-text-sm); font-style: normal; color: var(--mp-text-muted); margin-top: var(--mp-sp-3); }

code, kbd, pre, samp {
  font-family: var(--mp-font-mono);
  font-size: 0.9em;
}
code { background: rgba(176,137,104,0.1); padding: 0.15em 0.4em; border-radius: var(--mp-radius-sm); }
pre { background: var(--mp-dark); color: var(--mp-color-6); padding: var(--mp-sp-6); border-radius: var(--mp-radius); overflow-x: auto; margin: var(--mp-sp-6) 0; }
pre code { background: none; padding: 0; }

ul, ol { padding-left: 1.5em; margin-bottom: 1.25em; }
li + li { margin-top: 0.35em; }

hr { border: none; border-top: 1px solid var(--mp-border); margin: var(--mp-sp-8) 0; }

/* Eyebrow label */
.mp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--mp-sp-2);
  font-family: var(--mp-font-body);
  font-size: var(--mp-text-xs);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mp-accent);
}

/* Accent text */
.mp-accent-text { color: var(--mp-accent); }

/* Elegant underline style for h2/h1 */
.mp-heading--underline {
  position: relative;
  padding-bottom: var(--mp-sp-4);
}
.mp-heading--underline::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 48px; height: 2px;
  background: var(--mp-accent);
}
.mp-heading--underline.is-centered::after { left: 50%; transform: translateX(-50%); }

/* ==========================================================================
   4. Layout — Container & Grid
   ========================================================================== */

.mp-container {
  width: 100%;
  max-width: var(--mp-container);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--mp-edge-spacing);
  padding-right: var(--mp-edge-spacing);
}

.mp-container--narrow { max-width: var(--mp-container-narrow); }
.mp-container--wide   { max-width: min(100%, calc(var(--mp-container) + 200px)); }

.mp-section {
  padding-top: var(--mp-section-gap);
  padding-bottom: var(--mp-section-gap);
}
.mp-section--sm {
  padding-top: var(--mp-section-gap-sm);
  padding-bottom: var(--mp-section-gap-sm);
}
.mp-section--flush { padding: 0; }

/* Background variants */
.mp-section--white   { background: var(--mp-surface); }
.mp-section--cream   { background: var(--mp-bg); }
.mp-section--dark    { background: var(--mp-dark); }
.mp-section--accent  { background: var(--mp-accent); }

.mp-grid { display: grid; gap: var(--mp-sp-8); }
.mp-grid--2 { grid-template-columns: repeat(2, 1fr); }
.mp-grid--3 { grid-template-columns: repeat(3, 1fr); }
.mp-grid--4 { grid-template-columns: repeat(4, 1fr); }
.mp-grid--auto { grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }

.mp-flex { display: flex; gap: var(--mp-sp-4); }
.mp-flex--center { align-items: center; justify-content: center; }
.mp-flex--between { align-items: center; justify-content: space-between; }

/* ==========================================================================
   5. Utilities & Buttons
   ========================================================================== */

.mp-text-center { text-align: center; }
.mp-text-left   { text-align: left; }
.mp-sr-only { @extend .screen-reader-text; }

/* Buttons */
.mp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--mp-sp-2);
  padding: 0.75em 1.75em;
  border-radius: var(--mp-radius-full);
  font-family: var(--mp-font-body);
  font-size: var(--mp-text-sm);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--mp-transition);
  white-space: nowrap;
}

.mp-btn--primary {
  background: var(--mp-accent);
  color: var(--mp-surface);
  border-color: var(--mp-accent);
}
.mp-btn--primary:hover {
  background: var(--mp-accent-hover);
  border-color: var(--mp-accent-hover);
  color: var(--mp-surface);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(176,137,104,0.3);
}

.mp-btn--outline {
  background: transparent;
  color: var(--mp-text);
  border-color: var(--mp-border);
}
.mp-btn--outline:hover {
  border-color: var(--mp-accent);
  color: var(--mp-accent);
  background: rgba(176,137,104,0.05);
}

.mp-btn--ghost {
  background: transparent;
  color: var(--mp-accent);
  border-color: transparent;
  padding-left: 0; padding-right: 0;
}
.mp-btn--ghost::after { content: ' →'; transition: margin var(--mp-transition); }
.mp-btn--ghost:hover { color: var(--mp-accent-hover); }
.mp-btn--ghost:hover::after { margin-left: 4px; }

.mp-btn--dark {
  background: var(--mp-dark);
  color: var(--mp-color-6);
  border-color: var(--mp-dark);
}
.mp-btn--dark:hover { background: var(--mp-color-3); border-color: var(--mp-color-3); color: var(--mp-color-6); }

.mp-btn--sm { padding: 0.55em 1.25em; font-size: var(--mp-text-xs); }
.mp-btn--lg { padding: 0.9em 2.25em; font-size: var(--mp-text-base); }

/* Section header */
.mp-section-header {
  margin-bottom: var(--mp-sp-12);
}
.mp-section-header--center { text-align: center; }
.mp-section-header--center p { margin-left: auto; margin-right: auto; }

.mp-section-header .mp-eyebrow { margin-bottom: var(--mp-sp-3); }
.mp-section-header h2 { margin-bottom: var(--mp-sp-4); }
.mp-section-header p  { color: var(--mp-text-muted); font-size: var(--mp-text-lg); }

/* ==========================================================================
   6. Header & Navigation
   ========================================================================== */

.mp-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  height: var(--mp-header-h);
  display: flex;
  align-items: center;
  background: rgba(247,243,238,0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: background var(--mp-transition-slow), border-color var(--mp-transition-slow), box-shadow var(--mp-transition-slow);
}

.mp-header.is-scrolled {
  background: rgba(247,243,238,0.97);
  border-bottom-color: var(--mp-border);
  box-shadow: var(--mp-shadow-sm);
}

/* Transparent header variant (set via per-page meta) */
.mp-header--transparent {
  background: transparent !important;
  border-bottom-color: transparent !important;
}
.mp-header--transparent.is-scrolled {
  background: rgba(247,243,238,0.97) !important;
  border-bottom-color: var(--mp-border) !important;
}

/* Dark header (for dark hero pages) */
.mp-header--dark {
  background: rgba(15,14,13,0.85);
}
.mp-header--dark.is-scrolled {
  background: rgba(15,14,13,0.97);
  border-bottom-color: rgba(255,255,255,0.1);
}

.mp-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* Brand / Logo */
.mp-brand {
  display: flex;
  align-items: center;
  gap: var(--mp-sp-3);
  text-decoration: none;
  flex-shrink: 0;
}
.mp-brand__logo img { max-height: 40px; width: auto; }
.mp-brand__wordmark {
  font-family: var(--mp-font-heading);
  font-size: var(--mp-text-xl);
  font-weight: 700;
  color: var(--mp-text);
  letter-spacing: -0.02em;
}
.mp-brand__wordmark span { color: var(--mp-accent); }
.mp-brand:hover .mp-brand__wordmark { color: var(--mp-accent); }

/* Desktop nav */
.mp-nav { display: flex; align-items: center; gap: var(--mp-sp-1); }

.mp-nav__item { position: relative; list-style: none; }

.mp-nav__link {
  display: flex;
  align-items: center;
  gap: var(--mp-sp-1);
  padding: var(--mp-sp-2) var(--mp-sp-3);
  font-size: var(--mp-text-sm);
  font-weight: 500;
  color: var(--mp-text);
  text-decoration: none;
  border-radius: var(--mp-radius);
  transition: color var(--mp-transition), background var(--mp-transition);
  white-space: nowrap;
}
.mp-nav__link:hover,
.mp-nav__link:focus,
.current-menu-item > .mp-nav__link,
.current-menu-ancestor > .mp-nav__link {
  color: var(--mp-accent);
  background: rgba(176,137,104,0.07);
}
.mp-nav__link[aria-current="page"] { color: var(--mp-accent); }

/* Dropdown chevron */
.mp-dropdown-icon {
  width: 12px; height: 12px;
  transition: transform var(--mp-transition);
  flex-shrink: 0;
}
.mp-nav__item:hover .mp-dropdown-icon,
.mp-nav__item:focus-within .mp-dropdown-icon { transform: rotate(180deg); }

/* Sub-menu */
.mp-sub-menu {
  position: absolute;
  top: calc(100% + 8px); left: 0;
  min-width: 220px;
  background: var(--mp-surface);
  border: 1px solid var(--mp-border);
  border-radius: var(--mp-radius-lg);
  box-shadow: var(--mp-shadow-lg);
  padding: var(--mp-sp-2) var(--mp-sp-2);
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--mp-transition), transform var(--mp-transition), visibility var(--mp-transition);
  z-index: 100;
}
.mp-nav__item:hover > .mp-sub-menu,
.mp-nav__item:focus-within > .mp-sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.mp-sub-menu .mp-nav__link {
  font-size: var(--mp-text-sm);
  padding: var(--mp-sp-2) var(--mp-sp-3);
  border-radius: var(--mp-radius);
  width: 100%;
}

/* Header actions */
.mp-header__actions {
  display: flex;
  align-items: center;
  gap: var(--mp-sp-3);
}

/* Mobile toggle */
.mp-mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: none;
  border: 1px solid var(--mp-border);
  border-radius: var(--mp-radius);
  color: var(--mp-text);
  transition: border-color var(--mp-transition), color var(--mp-transition);
}
.mp-mobile-toggle:hover { border-color: var(--mp-accent); color: var(--mp-accent); }
.mp-mobile-toggle svg { width: 20px; height: 20px; }

/* ==========================================================================
   7. Mobile Navigation
   ========================================================================== */

.mp-mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 950;
  background: var(--mp-surface);
  padding: var(--mp-sp-6);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
}
.mp-mobile-nav.is-open {
  transform: translateX(0);
  display: block;
}

.mp-mobile-nav__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--mp-sp-8);
}
.mp-mobile-nav__close {
  background: none;
  border: 1px solid var(--mp-border);
  border-radius: var(--mp-radius);
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  color: var(--mp-text);
}

.mp-mobile-nav ul { list-style: none; padding: 0; }
.mp-mobile-nav > ul > li { border-bottom: 1px solid var(--mp-border); }
.mp-mobile-nav > ul > li > a {
  display: block;
  padding: var(--mp-sp-4) 0;
  font-size: var(--mp-text-lg);
  font-family: var(--mp-font-heading);
  color: var(--mp-text);
  text-decoration: none;
}
.mp-mobile-nav > ul > li > a:hover { color: var(--mp-accent); }
.mp-mobile-sub { padding-left: var(--mp-sp-4); padding-bottom: var(--mp-sp-2); }
.mp-mobile-sub a { display: block; padding: var(--mp-sp-2) 0; color: var(--mp-text-muted); font-size: var(--mp-text-base); }
.mp-mobile-sub a:hover { color: var(--mp-accent); }

/* Overlay behind mobile nav */
.mp-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 940;
  background: rgba(15,14,13,0.5);
  backdrop-filter: blur(4px);
}
.mp-mobile-overlay.is-visible { display: block; }

/* ==========================================================================
   8. Hero Sections
   ========================================================================== */

/* Shared hero base */
.mp-hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--mp-header-h) + var(--mp-sp-16));
  padding-bottom: var(--mp-sp-24);
}

/* Style: Centered */
.mp-hero--centered { text-align: center; }
.mp-hero--centered .mp-container { display: flex; flex-direction: column; align-items: center; }
.mp-hero--centered h1 { max-width: 14ch; }
.mp-hero--centered p { max-width: 54ch; }
.mp-hero--centered .mp-hero__actions { justify-content: center; }

/* Style: Split (text left, image right) */
.mp-hero--split .mp-container { display: grid; grid-template-columns: 1fr 1fr; gap: var(--mp-sp-16); align-items: center; }
.mp-hero--split .mp-hero__image { border-radius: var(--mp-radius-xl); overflow: hidden; aspect-ratio: 4/5; }
.mp-hero--split .mp-hero__image img { width: 100%; height: 100%; object-fit: cover; }

/* Style: Minimal (text only, no full height) */
.mp-hero--minimal { min-height: 0; padding-top: calc(var(--mp-header-h) + var(--mp-sp-20)); padding-bottom: var(--mp-sp-20); }
.mp-hero--minimal h1 { font-size: clamp(2.5rem, 6vw, 5rem); }

.mp-hero__eyebrow { margin-bottom: var(--mp-sp-5); }
.mp-hero__heading { margin-bottom: var(--mp-sp-6); }
.mp-hero__subtitle { font-size: var(--mp-text-lg); color: var(--mp-text-muted); margin-bottom: var(--mp-sp-10); max-width: 52ch; }
.mp-hero__actions { display: flex; flex-wrap: wrap; gap: var(--mp-sp-3); }

/* Decorative background elements */
.mp-hero__bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.mp-hero__bg-grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.4;
}
.mp-hero__accent-line {
  position: absolute;
  top: 40%; right: -100px;
  width: 500px; height: 500px;
  border-radius: 50%;
  border: 1px solid rgba(176,137,104,0.12);
}
.mp-hero__accent-line:nth-child(2) { width: 700px; height: 700px; border-color: rgba(176,137,104,0.07); }

/* Dark hero */
.mp-hero--dark {
  background: var(--mp-dark);
  color: var(--mp-color-6);
}
.mp-hero--dark h1, .mp-hero--dark h2 { color: var(--mp-color-6); }
.mp-hero--dark .mp-hero__subtitle { color: rgba(247,243,238,0.65); }

/* Scroll indicator */
.mp-scroll-indicator {
  position: absolute;
  bottom: var(--mp-sp-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: var(--mp-sp-2);
  font-size: var(--mp-text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mp-text-muted);
  animation: mp-bounce 2s ease-in-out infinite;
}
.mp-scroll-indicator svg { width: 16px; height: 16px; }
@keyframes mp-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ==========================================================================
   9. Cards
   ========================================================================== */

.mp-card {
  background: var(--mp-surface);
  border: 1px solid var(--mp-border);
  border-radius: var(--mp-radius-lg);
  overflow: hidden;
  transition: box-shadow var(--mp-transition), transform var(--mp-transition), border-color var(--mp-transition);
}
.mp-card:hover {
  box-shadow: var(--mp-shadow-lg);
  transform: translateY(-3px);
  border-color: rgba(176,137,104,0.25);
}

.mp-card__image { aspect-ratio: 16/9; overflow: hidden; }
.mp-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--mp-transition-slow); }
.mp-card:hover .mp-card__image img { transform: scale(1.04); }

.mp-card__body { padding: var(--mp-sp-6); }
.mp-card__meta { font-size: var(--mp-text-xs); color: var(--mp-text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: var(--mp-sp-2); }
.mp-card__title { font-family: var(--mp-font-heading); font-size: var(--mp-text-xl); font-weight: 400; color: var(--mp-text); margin-bottom: var(--mp-sp-2); line-height: var(--mp-leading-snug); }
.mp-card__excerpt { font-size: var(--mp-text-sm); color: var(--mp-text-muted); line-height: var(--mp-leading-normal); }
.mp-card__footer { padding: var(--mp-sp-4) var(--mp-sp-6); border-top: 1px solid var(--mp-border); display: flex; align-items: center; justify-content: space-between; }

/* ==========================================================================
   10. Portfolio
   ========================================================================== */

.mp-portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px,100%), 1fr));
  gap: var(--mp-sp-6);
}

.mp-portfolio-item {
  position: relative;
  border-radius: var(--mp-radius-lg);
  overflow: hidden;
  cursor: pointer;
}
.mp-portfolio-item__thumb {
  aspect-ratio: 4/3;
  background: var(--mp-border);
}
.mp-portfolio-item__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
}
.mp-portfolio-item:hover .mp-portfolio-item__thumb img { transform: scale(1.06); }

.mp-portfolio-item__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,14,13,0.88) 0%, rgba(15,14,13,0.2) 50%, transparent 100%);
  display: flex; align-items: flex-end;
  padding: var(--mp-sp-6);
  opacity: 0;
  transition: opacity var(--mp-transition-slow);
}
.mp-portfolio-item:hover .mp-portfolio-item__overlay { opacity: 1; }

.mp-portfolio-item__info h3 {
  font-family: var(--mp-font-heading);
  font-size: var(--mp-text-xl);
  font-weight: 400;
  color: #fff;
  margin-bottom: var(--mp-sp-1);
}
.mp-portfolio-item__info span {
  font-size: var(--mp-text-xs);
  color: rgba(247,243,238,0.7);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Portfolio filter bar */
.mp-portfolio-filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--mp-sp-2);
  margin-bottom: var(--mp-sp-8);
}
.mp-filter-btn {
  padding: var(--mp-sp-2) var(--mp-sp-4);
  font-size: var(--mp-text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mp-text-muted);
  background: transparent;
  border: 1px solid var(--mp-border);
  border-radius: var(--mp-radius-full);
  cursor: pointer;
  transition: all var(--mp-transition);
}
.mp-filter-btn.is-active,
.mp-filter-btn:hover {
  color: var(--mp-accent);
  border-color: var(--mp-accent);
  background: rgba(176,137,104,0.07);
}

/* ==========================================================================
   11. Services
   ========================================================================== */

.mp-service-card {
  padding: var(--mp-sp-8);
  border: 1px solid var(--mp-border);
  border-radius: var(--mp-radius-lg);
  background: var(--mp-surface);
  transition: box-shadow var(--mp-transition), border-color var(--mp-transition), transform var(--mp-transition);
  position: relative;
  overflow: hidden;
}
.mp-service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--mp-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--mp-transition-slow);
}
.mp-service-card:hover { box-shadow: var(--mp-shadow); transform: translateY(-2px); border-color: rgba(176,137,104,0.2); }
.mp-service-card:hover::before { transform: scaleX(1); }

.mp-service-card__icon {
  width: 48px; height: 48px;
  border-radius: var(--mp-radius);
  background: rgba(176,137,104,0.1);
  display: flex; align-items: center; justify-content: center;
  color: var(--mp-accent);
  margin-bottom: var(--mp-sp-5);
}
.mp-service-card__title { font-size: var(--mp-text-lg); font-weight: 600; margin-bottom: var(--mp-sp-3); }
.mp-service-card__desc { font-size: var(--mp-text-sm); color: var(--mp-text-muted); line-height: var(--mp-leading-loose); }

/* ==========================================================================
   12. Stats
   ========================================================================== */

.mp-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px,100%), 1fr));
  gap: var(--mp-sp-1);
}
.mp-stat {
  text-align: center;
  padding: var(--mp-sp-8) var(--mp-sp-6);
  border-right: 1px solid var(--mp-border);
}
.mp-stat:last-child { border-right: none; }

.mp-stat__number {
  font-family: var(--mp-font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--mp-accent);
  line-height: 1;
  margin-bottom: var(--mp-sp-2);
  letter-spacing: -0.03em;
}
.mp-stat__label {
  font-size: var(--mp-text-sm);
  color: var(--mp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ==========================================================================
   13. Testimonials
   ========================================================================== */

.mp-testimonial {
  padding: var(--mp-sp-8);
  background: var(--mp-surface);
  border: 1px solid var(--mp-border);
  border-radius: var(--mp-radius-lg);
  display: flex;
  flex-direction: column;
  gap: var(--mp-sp-5);
}

.mp-testimonial__quote {
  font-family: var(--mp-font-heading);
  font-size: var(--mp-text-lg);
  font-style: italic;
  color: var(--mp-text);
  line-height: var(--mp-leading-loose);
  flex: 1;
}
.mp-testimonial__quote::before { content: '\201C'; color: var(--mp-accent); font-size: 2em; line-height: 0; vertical-align: -0.4em; margin-right: 2px; }

.mp-testimonial__author {
  display: flex;
  align-items: center;
  gap: var(--mp-sp-3);
}
.mp-testimonial__avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--mp-border);
}
.mp-testimonial__avatar img { width: 100%; height: 100%; object-fit: cover; }
.mp-testimonial__avatar-initials {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--mp-accent);
  color: var(--mp-surface);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: var(--mp-text-sm);
  flex-shrink: 0;
}
.mp-testimonial__name { font-weight: 600; font-size: var(--mp-text-sm); }
.mp-testimonial__role { font-size: var(--mp-text-xs); color: var(--mp-text-muted); }

/* ==========================================================================
   14. About
   ========================================================================== */

.mp-about-split {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: var(--mp-sp-16);
  align-items: center;
}
.mp-about-split--reverse .mp-about__image { order: 2; }
.mp-about-split--reverse .mp-about__content { order: 1; }

.mp-about__image {
  position: relative;
  border-radius: var(--mp-radius-xl);
  overflow: hidden;
  aspect-ratio: 3/4;
}
.mp-about__image img { width: 100%; height: 100%; object-fit: cover; }
.mp-about__image-badge {
  position: absolute;
  bottom: var(--mp-sp-6); right: var(--mp-sp-6);
  background: var(--mp-surface);
  border-radius: var(--mp-radius-lg);
  padding: var(--mp-sp-4) var(--mp-sp-5);
  box-shadow: var(--mp-shadow-lg);
  text-align: center;
}
.mp-about__image-badge strong { display: block; font-family: var(--mp-font-heading); font-size: var(--mp-text-2xl); color: var(--mp-accent); }
.mp-about__image-badge span   { font-size: var(--mp-text-xs); color: var(--mp-text-muted); text-transform: uppercase; letter-spacing: 0.1em; }

.mp-about__content h2 { margin-bottom: var(--mp-sp-5); }
.mp-about__content p  { margin-bottom: var(--mp-sp-5); color: var(--mp-text-muted); }
.mp-about__highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--mp-sp-4);
  margin: var(--mp-sp-8) 0;
}
.mp-about__highlight {
  display: flex;
  align-items: center;
  gap: var(--mp-sp-3);
  font-size: var(--mp-text-sm);
  font-weight: 500;
}
.mp-about__highlight svg { color: var(--mp-accent); width: 18px; height: 18px; flex-shrink: 0; }

/* ==========================================================================
   15. Blog Preview & Archive Cards
   ========================================================================== */

.mp-blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px,100%), 1fr));
  gap: var(--mp-sp-6);
}

.mp-post-card { display: flex; flex-direction: column; }
.mp-post-card .mp-card__body { flex: 1; display: flex; flex-direction: column; }
.mp-post-card .mp-card__excerpt { flex: 1; margin-bottom: var(--mp-sp-4); }

/* Archive layout */
.mp-archive-layout { display: grid; grid-template-columns: 1fr 320px; gap: var(--mp-sp-12); align-items: start; }
.mp-archive-layout--no-sidebar { grid-template-columns: 1fr; }

/* ==========================================================================
   16. CTA
   ========================================================================== */

.mp-cta {
  background: var(--mp-dark);
  border-radius: var(--mp-radius-xl);
  padding: var(--mp-sp-16) var(--mp-sp-12);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.mp-cta::before {
  content: '';
  position: absolute;
  top: -30%; left: 50%;
  transform: translateX(-50%);
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(176,137,104,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.mp-cta h2 { color: var(--mp-color-6); margin-bottom: var(--mp-sp-4); font-size: clamp(1.75rem, 4vw, 3rem); }
.mp-cta p  { color: rgba(247,243,238,0.65); margin-bottom: var(--mp-sp-8); }
.mp-cta .mp-btn--primary { background: var(--mp-accent); color: var(--mp-surface); border-color: var(--mp-accent); }

/* ==========================================================================
   17. Contact Form
   ========================================================================== */

.mp-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--mp-sp-16);
  align-items: start;
}

.mp-contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: var(--mp-sp-4);
  margin-bottom: var(--mp-sp-6);
}
.mp-contact-info-item__icon {
  width: 40px; height: 40px;
  border-radius: var(--mp-radius);
  background: rgba(176,137,104,0.1);
  display: flex; align-items: center; justify-content: center;
  color: var(--mp-accent);
  flex-shrink: 0;
}
.mp-contact-info-item__label { font-size: var(--mp-text-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--mp-text-muted); margin-bottom: 2px; }
.mp-contact-info-item a { color: var(--mp-text); font-weight: 500; }
.mp-contact-info-item a:hover { color: var(--mp-accent); }

/* Form */
.mp-form { display: flex; flex-direction: column; gap: var(--mp-sp-4); }
.mp-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--mp-sp-4); }

.mp-form-group { display: flex; flex-direction: column; gap: var(--mp-sp-2); }
.mp-form-group label {
  font-size: var(--mp-text-sm);
  font-weight: 600;
  color: var(--mp-text);
}

.mp-form-group input,
.mp-form-group select,
.mp-form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--mp-surface);
  border: 1px solid var(--mp-border);
  border-radius: var(--mp-radius);
  color: var(--mp-text);
  font-size: var(--mp-text-sm);
  transition: border-color var(--mp-transition), box-shadow var(--mp-transition);
}
.mp-form-group input::placeholder,
.mp-form-group textarea::placeholder { color: var(--mp-text-muted); }

.mp-form-group input:focus,
.mp-form-group select:focus,
.mp-form-group textarea:focus {
  outline: none;
  border-color: var(--mp-accent);
  box-shadow: 0 0 0 3px rgba(176,137,104,0.12);
}
.mp-form-group input.is-error,
.mp-form-group textarea.is-error { border-color: #dc2626; }

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

.mp-form-notice {
  padding: var(--mp-sp-4) var(--mp-sp-5);
  border-radius: var(--mp-radius);
  font-size: var(--mp-text-sm);
}
.mp-form-notice--success { background: rgba(107,143,113,0.1); border: 1px solid rgba(107,143,113,0.3); color: #2d6a35; }
.mp-form-notice--error   { background: rgba(220,38,38,0.08);  border: 1px solid rgba(220,38,38,0.25);  color: #b91c1c; }

/* ==========================================================================
   18. Footer
   ========================================================================== */

.mp-footer {
  background: var(--mp-dark);
  color: var(--mp-color-5);
  padding-top: var(--mp-sp-16);
}

.mp-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--mp-sp-8);
  margin-bottom: var(--mp-sp-12);
}

.mp-footer__brand { padding-right: var(--mp-sp-8); }
.mp-footer__logo { margin-bottom: var(--mp-sp-4); }
.mp-footer__logo .mp-brand__wordmark { color: var(--mp-color-6); }
.mp-footer__bio { font-size: var(--mp-text-sm); color: rgba(247,243,238,0.55); line-height: var(--mp-leading-loose); max-width: 30ch; }

.mp-footer__socials {
  display: flex;
  gap: var(--mp-sp-3);
  margin-top: var(--mp-sp-5);
}
.mp-footer__social-link {
  width: 36px; height: 36px;
  border-radius: var(--mp-radius);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  color: rgba(247,243,238,0.5);
  text-decoration: none;
  transition: all var(--mp-transition);
}
.mp-footer__social-link:hover { border-color: var(--mp-accent); color: var(--mp-accent); }
.mp-footer__social-link svg { width: 16px; height: 16px; }

.mp-footer__col-title {
  font-size: var(--mp-text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(247,243,238,0.4);
  margin-bottom: var(--mp-sp-4);
}
.mp-footer__links { list-style: none; padding: 0; }
.mp-footer__links li + li { margin-top: var(--mp-sp-3); }
.mp-footer__links a {
  font-size: var(--mp-text-sm);
  color: rgba(247,243,238,0.55);
  text-decoration: none;
  transition: color var(--mp-transition);
}
.mp-footer__links a:hover { color: var(--mp-accent); }

.mp-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: var(--mp-sp-5) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mp-footer__copyright {
  font-size: var(--mp-text-xs);
  color: rgba(247,243,238,0.35);
}
.mp-footer__legal { display: flex; gap: var(--mp-sp-5); }
.mp-footer__legal a { font-size: var(--mp-text-xs); color: rgba(247,243,238,0.35); text-decoration: none; }
.mp-footer__legal a:hover { color: var(--mp-accent); }

/* Back to top */
.mp-back-to-top {
  position: fixed;
  bottom: var(--mp-sp-6); right: var(--mp-sp-6);
  z-index: 500;
  width: 44px; height: 44px;
  background: var(--mp-accent);
  color: var(--mp-surface);
  border-radius: var(--mp-radius);
  display: flex; align-items: center; justify-content: center;
  border: none;
  box-shadow: var(--mp-shadow);
  opacity: 0; visibility: hidden;
  transition: all var(--mp-transition);
  cursor: pointer;
}
.mp-back-to-top.is-visible { opacity: 1; visibility: visible; }
.mp-back-to-top:hover { background: var(--mp-accent-hover); transform: translateY(-2px); }
.mp-back-to-top svg { width: 18px; height: 18px; }

/* ==========================================================================
   19. Single Post / Page Content
   ========================================================================== */

.mp-page-header {
  padding-top: calc(var(--mp-header-h) + var(--mp-sp-16));
  padding-bottom: var(--mp-sp-12);
  background: var(--mp-surface);
  border-bottom: 1px solid var(--mp-border);
}
.mp-page-header--dark {
  background: var(--mp-dark);
  border-bottom-color: rgba(255,255,255,0.07);
}
.mp-page-header--dark h1,
.mp-page-header--dark .mp-eyebrow { color: var(--mp-color-6); }
.mp-page-header--dark .mp-post-meta { color: rgba(247,243,238,0.5); }

.mp-page-header__inner { max-width: 800px; }
.mp-page-header--center .mp-page-header__inner { max-width: 680px; margin: 0 auto; text-align: center; }

.mp-post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--mp-sp-3);
  font-size: var(--mp-text-sm);
  color: var(--mp-text-muted);
  margin-top: var(--mp-sp-4);
}
.mp-post-meta a { color: var(--mp-text-muted); }
.mp-post-meta a:hover { color: var(--mp-accent); }
.mp-post-meta__sep { color: var(--mp-border); }

.mp-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: var(--mp-sp-12);
  align-items: start;
}
.mp-entry--no-sidebar { grid-template-columns: 1fr; }

.mp-entry-content {
  max-width: 75ch;
  font-size: var(--mp-text-lg);
  line-height: var(--mp-leading-loose);
}
.mp-entry-content h2,
.mp-entry-content h3,
.mp-entry-content h4 { margin-top: 1.75em; margin-bottom: 0.5em; }
.mp-entry-content p  { margin-bottom: 1.25em; }
.mp-entry-content ul,
.mp-entry-content ol { margin-bottom: 1.25em; padding-left: 1.5em; }
.mp-entry-content li + li { margin-top: 0.4em; }
.mp-entry-content figure { margin: 2em 0; }
.mp-entry-content figure img { border-radius: var(--mp-radius-lg); }
.mp-entry-content figcaption { text-align: center; font-size: var(--mp-text-sm); color: var(--mp-text-muted); margin-top: var(--mp-sp-2); }
.mp-entry-content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; }
.mp-entry-content th, .mp-entry-content td { padding: var(--mp-sp-3) var(--mp-sp-4); border-bottom: 1px solid var(--mp-border); text-align: left; }
.mp-entry-content th { font-weight: 700; background: rgba(176,137,104,0.05); }

/* Featured image */
.mp-featured-image {
  margin-bottom: var(--mp-sp-12);
  border-radius: var(--mp-radius-xl);
  overflow: hidden;
  aspect-ratio: 16/7;
}
.mp-featured-image img { width: 100%; height: 100%; object-fit: cover; }

/* Entry footer */
.mp-entry-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--mp-sp-4);
  padding-top: var(--mp-sp-6);
  border-top: 1px solid var(--mp-border);
  margin-top: var(--mp-sp-8);
}
.mp-entry-tags { display: flex; flex-wrap: wrap; gap: var(--mp-sp-2); }
.mp-tag {
  display: inline-block;
  padding: var(--mp-sp-1) var(--mp-sp-3);
  background: rgba(176,137,104,0.1);
  color: var(--mp-accent);
  border-radius: var(--mp-radius-full);
  font-size: var(--mp-text-xs);
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.05em;
}
.mp-tag:hover { background: var(--mp-accent); color: var(--mp-surface); }

/* Navigation between posts */
.mp-post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--mp-sp-4);
  margin-top: var(--mp-sp-12);
}
.mp-post-nav-item {
  padding: var(--mp-sp-5) var(--mp-sp-6);
  background: var(--mp-surface);
  border: 1px solid var(--mp-border);
  border-radius: var(--mp-radius-lg);
  text-decoration: none;
  transition: all var(--mp-transition);
}
.mp-post-nav-item:hover { border-color: var(--mp-accent); box-shadow: var(--mp-shadow); }
.mp-post-nav-item--next { text-align: right; }
.mp-post-nav-item__label { display: block; font-size: var(--mp-text-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--mp-text-muted); margin-bottom: var(--mp-sp-1); }
.mp-post-nav-item__title { font-family: var(--mp-font-heading); color: var(--mp-text); font-size: var(--mp-text-lg); font-weight: 400; }

/* ==========================================================================
   20. Sidebar
   ========================================================================== */

.mp-sidebar { position: sticky; top: calc(var(--mp-header-h) + var(--mp-sp-6)); }
.mp-widget { margin-bottom: var(--mp-sp-8); }
.mp-widget-title {
  font-size: var(--mp-text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mp-text);
  margin-bottom: var(--mp-sp-4);
  padding-bottom: var(--mp-sp-3);
  border-bottom: 2px solid var(--mp-accent);
  display: inline-block;
}
.mp-widget ul { list-style: none; padding: 0; }
.mp-widget ul li { padding: var(--mp-sp-2) 0; border-bottom: 1px solid var(--mp-border); font-size: var(--mp-text-sm); }
.mp-widget ul li:last-child { border-bottom: none; }
.mp-widget ul li a { color: var(--mp-text); text-decoration: none; }
.mp-widget ul li a:hover { color: var(--mp-accent); }

/* ==========================================================================
   21. Comments
   ========================================================================== */

.mp-comments { margin-top: var(--mp-sp-12); padding-top: var(--mp-sp-8); border-top: 1px solid var(--mp-border); }
.mp-comments-title { font-size: var(--mp-text-xl); margin-bottom: var(--mp-sp-8); }
.mp-comment-list { list-style: none; padding: 0; }
.mp-comment { padding: var(--mp-sp-5) 0; border-bottom: 1px solid var(--mp-border); }
.mp-comment__meta { display: flex; align-items: center; gap: var(--mp-sp-3); margin-bottom: var(--mp-sp-3); }
.mp-comment__avatar img { border-radius: 50%; }
.mp-comment__author { font-weight: 600; font-size: var(--mp-text-sm); }
.mp-comment__date   { font-size: var(--mp-text-xs); color: var(--mp-text-muted); }
.mp-comment__content { font-size: var(--mp-text-sm); color: var(--mp-text-muted); }

/* ==========================================================================
   22. 404
   ========================================================================== */

.mp-404 {
  min-height: 80vh;
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: var(--mp-sp-16) var(--mp-edge-spacing);
}
.mp-404__code {
  font-family: var(--mp-font-heading);
  font-size: clamp(7rem, 18vw, 14rem);
  font-weight: 700;
  line-height: 1;
  color: var(--mp-border);
  margin-bottom: var(--mp-sp-4);
  letter-spacing: -0.04em;
}
.mp-404__title { font-size: var(--mp-text-3xl); margin-bottom: var(--mp-sp-4); }
.mp-404__desc  { color: var(--mp-text-muted); max-width: 40ch; margin: 0 auto var(--mp-sp-8); }

/* ==========================================================================
   23. Page Templates
   ========================================================================== */

/* Full Width — no sidebar, content at full container width */
body.mp-tpl-full-width .mp-entry { grid-template-columns: 1fr; }
body.mp-tpl-full-width .mp-entry-content { max-width: 100%; }

/* Narrow — centered reading layout */
body.mp-tpl-narrow .mp-container { max-width: var(--mp-container-narrow); }
body.mp-tpl-narrow .mp-entry { grid-template-columns: 1fr; }

/* Canvas — no header/footer chrome */
body.mp-tpl-canvas { background: var(--mp-surface); }
body.mp-tpl-canvas .mp-header,
body.mp-tpl-canvas .mp-footer { display: none; }
body.mp-tpl-canvas .mp-page-header { padding-top: var(--mp-sp-16); }

/* Landing — no nav, conversion focused */
body.mp-tpl-landing .mp-nav,
body.mp-tpl-landing .mp-header__actions .mp-mobile-toggle { display: none; }
body.mp-tpl-landing .mp-footer .mp-footer__grid { display: none; }

/* ==========================================================================
   24. Animations
   ========================================================================== */

.mp-fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.mp-fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes mp-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}
@keyframes mp-spin {
  to { transform: rotate(360deg); }
}

/* Stagger delay for grids */
.mp-fade-in:nth-child(1) { transition-delay: 0s; }
.mp-fade-in:nth-child(2) { transition-delay: 0.1s; }
.mp-fade-in:nth-child(3) { transition-delay: 0.2s; }
.mp-fade-in:nth-child(4) { transition-delay: 0.3s; }
.mp-fade-in:nth-child(5) { transition-delay: 0.4s; }
.mp-fade-in:nth-child(6) { transition-delay: 0.5s; }

/* ==========================================================================
   25. Responsive
   ========================================================================== */

@media (max-width: 1024px) {
  :root {
    --mp-section-gap: 5rem;
    --mp-container: 100%;
  }
  .mp-header__nav { display: none; }
  .mp-mobile-toggle { display: flex; }
  .mp-hero--split .mp-container { grid-template-columns: 1fr; }
  .mp-hero--split .mp-hero__image { aspect-ratio: 16/7; max-height: 420px; order: -1; }
  .mp-about-split { grid-template-columns: 1fr; }
  .mp-about__image { aspect-ratio: 16/7; max-height: 400px; }
  .mp-contact-grid { grid-template-columns: 1fr; }
  .mp-footer__grid { grid-template-columns: 1fr 1fr; }
  .mp-archive-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root {
    --mp-section-gap: 4rem;
    --mp-edge-spacing: 1.25rem;
    --mp-header-h: 64px;
  }
  .mp-grid--2,
  .mp-grid--3,
  .mp-grid--4 { grid-template-columns: 1fr; }
  .mp-stats-grid { grid-template-columns: 1fr 1fr; }
  .mp-stat { border-right: none; border-bottom: 1px solid var(--mp-border); }
  .mp-stat:last-child { border-bottom: none; }
  .mp-about__highlights { grid-template-columns: 1fr; }
  .mp-footer__grid { grid-template-columns: 1fr; }
  .mp-cta { padding: var(--mp-sp-10) var(--mp-sp-6); }
  .mp-entry { grid-template-columns: 1fr; }
  .mp-post-nav { grid-template-columns: 1fr; }
  .mp-form-row { grid-template-columns: 1fr; }
  .mp-footer__bottom { flex-direction: column; text-align: center; gap: var(--mp-sp-3); }
  .mp-section-header { margin-bottom: var(--mp-sp-8); }
}

@media (max-width: 480px) {
  :root { --mp-section-gap: 3.5rem; }
  .mp-hero { min-height: auto; padding-top: calc(var(--mp-header-h) + var(--mp-sp-10)); padding-bottom: var(--mp-sp-12); }
  .mp-hero__actions { flex-direction: column; align-items: stretch; }
  .mp-hero__actions .mp-btn { justify-content: center; }
  .mp-stats-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   26. JS-Driven States (main.js)
   ========================================================================== */

/* --- Sticky header hide-on-scroll --- */
.mp-header {
  transition: transform 0.3s ease, background-color var(--mp-transition), box-shadow var(--mp-transition);
}
.mp-header.is-hidden {
  transform: translateY(-100%);
}

/* --- Portfolio filter hidden state --- */
.mp-portfolio-item--hidden {
  display: none !important;
}

/* --- Portfolio filter buttons --- */
.mp-portfolio-filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--mp-sp-2);
  margin-bottom: var(--mp-sp-8);
}
.mp-portfolio-filter [data-filter] {
  padding: var(--mp-sp-2) var(--mp-sp-4);
  background: transparent;
  border: 1px solid var(--mp-border);
  border-radius: var(--mp-radius-full);
  font-size: var(--mp-text-sm);
  font-weight: 500;
  color: var(--mp-text-muted);
  cursor: pointer;
  transition: all var(--mp-transition);
}
.mp-portfolio-filter [data-filter]:hover,
.mp-portfolio-filter [data-filter].is-active {
  background: var(--mp-accent);
  border-color: var(--mp-accent);
  color: var(--mp-surface);
}

/* --- Contact form validation --- */
.mp-form-group input.is-invalid,
.mp-form-group select.is-invalid,
.mp-form-group textarea.is-invalid {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}
.mp-field-error {
  display: block;
  font-size: var(--mp-text-xs);
  color: #dc2626;
  margin-top: var(--mp-sp-1);
}

/* --- Typewriter cursor --- */
.mp-typewriter::after {
  content: '|';
  display: inline-block;
  color: var(--mp-accent);
  animation: mp-blink 0.75s step-end infinite;
  margin-left: 1px;
}
@keyframes mp-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* --- Lightbox --- */
#mp-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(15, 14, 13, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--mp-sp-6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: mp-lb-in 0.2s ease;
}
#mp-lightbox[hidden] { display: none; }
@keyframes mp-lb-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.mp-lightbox__inner {
  position: relative;
  max-width: min(90vw, 1100px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--mp-sp-4);
}
.mp-lightbox__img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--mp-radius-lg);
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
  object-fit: contain;
}
.mp-lightbox__caption {
  color: rgba(247, 243, 238, 0.6);
  font-size: var(--mp-text-sm);
  text-align: center;
  max-width: 60ch;
}
.mp-lightbox__close {
  position: fixed;
  top: var(--mp-sp-5);
  right: var(--mp-sp-5);
  width: 44px;
  height: 44px;
  border-radius: var(--mp-radius);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(247,243,238,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--mp-transition);
}
.mp-lightbox__close:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

/* --- Stagger wrap (JS adds data-delay, CSS provides the variable) --- */
.mp-stagger-wrap > .mp-fade-in {
  transition-delay: var(--mp-stagger-delay, 0ms);
}
