/*
Theme Name: Margaret Jemituwi Portfolio
Theme URI: https://margaretjemituwi.com/
Author: Margaret Jemituwi
Author URI: https://margaretjemituwi.com/
Description: An editorial, high-authority portfolio and content strategist theme for writers, strategists, journalists, and founders.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
License: MIT
License URI: https://opensource.org/licenses/MIT
Text Domain: margaret-portfolio
Tags: portfolio, blog, custom-header, custom-menu, featured-images, full-width-template, theme-options, translation-ready
*/

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

:root {
  --paper: #f9f4ef;
  --paper-2: #f5eee8;
  --ink: #201b19;
  --muted: #817772;
  --line: #e5ddd7;
  --pink: #f1dfe2;
  --white: #fffdfb;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity .2s ease, color .2s ease;
}

a:hover {
  opacity: .85;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

/* ==========================================================================
   Site Header & Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 64px;
  padding: 0 5.5vw;
  display: flex;
  align-items: center;
  gap: 34px;
  background: rgba(249, 244, 239, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brand {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 15px;
  white-space: nowrap;
  letter-spacing: normal;
  color: var(--ink);
}

.custom-logo-link img {
  max-height: 40px;
  width: auto;
}

.nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
  list-style: none;
  padding: 0;
  margin-top: 0;
  margin-bottom: 0;
}

.nav li {
  display: inline-flex;
  align-items: center;
}

.nav a,
.header-cta,
.eyebrow,
.section-head a,
.work-card p,
.mini-title,
.section-label,
.latest-head,
.footer h4,
.footer p,
.statement-inner p,
.nav-links a,
.page-numbers {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 8px;
}

.nav a {
  color: #655e59;
  font-weight: 500;
}

.nav a:hover,
.nav .current-menu-item > a {
  color: var(--ink);
}

.header-cta {
  padding: 11px 16px;
  background: var(--ink);
  color: white !important;
  letter-spacing: .08em;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.header-cta:hover {
  background: #38312e;
}

.menu-toggle {
  display: none;
  border: 0;
  background: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--ink);
  padding: 5px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  min-height: 600px;
  padding: 90px 12vw;
  display: grid;
  grid-template-columns: 1fr 420px;
  align-items: center;
  gap: 70px;
}

.hero-copy {
  max-width: 620px;
}

.eyebrow {
  color: var(--muted);
  margin: 0 0 24px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 400;
  color: var(--ink);
}

.hero h1 {
  font-size: clamp(44px, 5vw, 68px);
  line-height: .98;
  letter-spacing: -.035em;
  margin: 0 0 24px;
}

.intro {
  max-width: 510px;
  color: #655e59;
  line-height: 1.75;
  font-size: 10px;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 19px;
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: 3px;
  cursor: pointer;
  transition: all .25s ease;
}

.button.dark {
  background: var(--ink);
  color: white;
  border: 1px solid var(--ink);
}

.button.dark:hover {
  background: #3a322e;
  border-color: #3a322e;
}

.button.light {
  border: 1px solid #bbb2ac;
  background: transparent;
  color: var(--ink);
}

.button.light:hover {
  background: #eee5de;
}

.hero-image {
  background: #e9e0d9;
  border-radius: 3px;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  display: block;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 3px;
}

/* ==========================================================================
   Statement Section
   ========================================================================== */

.statement {
  min-height: 360px;
  border-block: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: left;
}

.statement-inner {
  width: min(620px, 100%);
}

.line {
  display: block;
  width: 28px;
  height: 1px;
  background: #aaa09a;
  margin-bottom: 22px;
}

.statement h2 {
  font-size: 31px;
  line-height: 1.12;
  margin: 0;
}

.statement-inner p {
  margin-top: 22px;
  color: var(--muted);
}

/* ==========================================================================
   Areas of Expertise (Accordion)
   ========================================================================== */

.expertise {
  display: grid;
  grid-template-columns: 30% 70%;
  padding: 80px 7%;
  background: #fbf7f4;
}

.section-label {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 22px;
}

.expertise-list {
  border-top: 1px solid #ddd5cf;
}

.expertise-item {
  border-bottom: 1px solid #ddd5cf;
}

.expertise-btn {
  width: 100%;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  background: transparent;
  color: #181614;
  font-family: "DM Sans", sans-serif;
  font-size: 9px;
  text-align: left;
  cursor: pointer;
  transition: padding .3s ease;
}

.expertise-btn:hover {
  padding-left: 8px;
  padding-right: 8px;
}

.expertise-btn .number {
  font-size: 7px;
  color: #817973;
}

.expertise-description {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .4s ease, opacity .3s ease;
  opacity: 0;
}

.expertise-description p {
  overflow: hidden;
  max-width: 550px;
  margin: 0;
  color: #665f5a;
  font-size: 8px;
  line-height: 1.7;
}

.expertise-item.active .expertise-description {
  grid-template-rows: 1fr;
  padding-bottom: 20px;
  opacity: 1;
}

.expertise-item.active .expertise-btn {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 15px;
}

/* ==========================================================================
   Selected Work
   ========================================================================== */

.selected-work {
  background: var(--paper-2);
  padding: 78px 5vw 90px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 34px;
}

.section-head h2 {
  font-size: 25px;
  margin: 0;
}

.section-head a {
  color: var(--muted);
}

.work-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  align-items: start;
}

.work-card img {
  display: block;
  width: 100%;
  object-fit: cover;
  border-radius: 3px;
}

.featured img {
  aspect-ratio: 1.78;
}

.work-card:not(.featured) img {
  aspect-ratio: .75;
}

.work-card p {
  margin: 10px 0 3px;
  color: var(--muted);
}

.work-card h3 {
  font-size: 15px;
  margin: 0;
}

.work-card span {
  float: right;
  font-size: 8px;
  color: var(--muted);
}

/* ==========================================================================
   Books Showcase
   ========================================================================== */

.books {
  padding: 80px 5vw 85px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.mini-title {
  color: var(--muted);
  margin: 0 0 8px;
}

.books h2 {
  margin: 0 0 35px;
  font-size: 25px;
}

.book-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
  text-align: left;
}

.book-card {
  position: relative;
}

.book-row img {
  width: 100%;
  aspect-ratio: .63;
  object-fit: cover;
  display: block;
  border-radius: 3px;
}

.book-row p {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 10px;
  line-height: 1.25;
  margin: 8px 0 2px;
}

.book-row small {
  color: var(--muted);
  font-size: 7px;
}

.book-link {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 13px;
  border: 1px solid #aaa19b;
  font-size: 7px;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-radius: 3px;
  transition: all .25s ease;
}

.book-link:hover {
  background: #181614;
  color: #fff;
  border-color: #181614;
}

/* ==========================================================================
   Testimonials / Quotes Slider
   ========================================================================== */

.quote-section {
  position: relative;
  width: 100%;
  min-height: 460px;
  padding: 90px 8%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fbf7f4;
  overflow: hidden;
}

.quote-mark {
  position: absolute;
  top: 45px;
  left: 6%;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 100px;
  line-height: 1;
  color: #d8d0ca;
  pointer-events: none;
}

.quote-slider {
  width: 100%;
  max-width: 1050px;
}

.quote {
  display: none;
  width: 100%;
  grid-template-columns: minmax(160px, 220px) 1fr;
  align-items: center;
  gap: clamp(30px, 5vw, 65px);
  border-left: 1px solid #d8d0ca;
  padding-left: clamp(20px, 4vw, 45px);
}

.quote.active {
  display: grid;
}

.quote-image {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.quote-image img {
  width: 100%;
  height: 100%;
  border-radius: 3px;
  display: block;
  object-fit: cover;
}

.quote-content {
  width: 100%;
  max-width: 680px;
}

.quote-content p {
  margin: 0 0 25px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.quote-content small {
  display: block;
  font-size: 8px;
  line-height: 1.7;
  letter-spacing: .08em;
  color: #6f6862;
}

.slider-dots {
  position: absolute;
  left: 8%;
  bottom: 35px;
  display: flex;
  gap: 8px;
}

.slider-dots button {
  width: 34px;
  height: 34px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c9c0b9;
  background: transparent;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}

.slider-dots button:hover {
  background: #181614;
  color: #fff;
}

/* ==========================================================================
   Insights & Newsletter
   ========================================================================== */

.insights {
  padding: 80px 9vw;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 90px;
}

.memo h2 {
  font-size: 24px;
  margin: 0 0 12px;
}

.memo > p {
  max-width: 420px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

#newsletter,
.newsletter-form {
  margin-top: 38px;
  max-width: 430px;
}

#newsletter label,
.newsletter-form label {
  display: block;
  font-size: 8px;
  color: var(--muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.email-row {
  display: flex;
  border-bottom: 1px solid #aaa19b;
}

.email-row input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 10px 0;
  font-size: 9px;
  color: var(--ink);
}

.email-row button {
  border: 0;
  background: transparent;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 8px;
  letter-spacing: .1em;
  color: var(--ink);
  padding: 10px 0;
}

#form-message {
  display: block;
  margin-top: 10px;
  color: #6c806a;
  font-size: 8px;
}

.latest-head {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  margin-bottom: 25px;
}

.latest > a,
.latest .post-link {
  display: block;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 15px;
  color: var(--ink);
  transition: padding-left .2s ease;
}

.latest > a:hover,
.latest .post-link:hover {
  padding-left: 6px;
}

/* ==========================================================================
   Call To Action (CTA)
   ========================================================================== */

.cta {
  padding: 90px 20px;
  text-align: center;
  background: var(--pink);
}

.cta h2 {
  font-size: 42px;
  line-height: 1.05;
  margin: 0 0 25px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  padding: 55px 5vw;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 50px;
  background: #eee6df;
}

.footer > div {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer .brand {
  margin-bottom: auto;
}

.footer p {
  margin-top: 70px;
  color: #837b75;
  letter-spacing: .05em;
  font-size: 8px;
}

.footer h4 {
  margin: 0 0 6px;
  color: var(--muted);
  font-weight: 500;
}

.footer a:not(.brand) {
  font-size: 10px;
  color: #5d5651;
}

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

/* ==========================================================================
   WordPress Core Classes & Helpers
   ========================================================================== */

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: #f1f1f1;
  border-radius: 3px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto !important;
  clip-path: none;
  color: #21759b;
  display: block;
  font-size: 14px;
  font-size: 0.875rem;
  font-weight: bold;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

.alignleft {
  float: left;
  margin: 0 1.5em 1em 0;
}

.alignright {
  float: right;
  margin: 0 0 1em 1.5em;
}

.aligncenter {
  clear: both;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.wp-caption {
  margin-bottom: 1.5em;
  max-width: 100%;
}

.wp-caption img[class*="wp-image-"] {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.wp-caption-text {
  text-align: center;
  font-size: 8px;
  color: var(--muted);
  margin-top: 6px;
}

/* Archive & Blog Listings */
.blog-archive {
  padding: 80px 8vw 100px;
  max-width: 1100px;
  margin: 0 auto;
}

.archive-header {
  margin-bottom: 50px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 25px;
}

.archive-header h1 {
  font-size: clamp(34px, 4vw, 48px);
  margin: 0 0 15px;
}

.archive-header .archive-description {
  color: var(--muted);
  font-size: 10px;
  max-width: 600px;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 40px 30px;
}

.post-card {
  display: flex;
  flex-direction: column;
}

.post-card .post-card-thumb {
  margin-bottom: 16px;
  border-radius: 3px;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--paper-2);
}

.post-card .post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.post-card:hover .post-card-thumb img {
  transform: scale(1.03);
}

.post-card .post-card-meta {
  font-size: 7px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.post-card h2 {
  font-size: 18px;
  line-height: 1.25;
  margin: 0 0 10px;
}

.post-card .post-excerpt {
  color: #655e59;
  font-size: 8.5px;
  line-height: 1.6;
  margin-bottom: 14px;
}

.post-card .read-more {
  font-size: 7.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 600;
  margin-top: auto;
}

.pagination {
  margin-top: 60px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #d4ccc6;
  border-radius: 3px;
  color: var(--ink);
}

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

/* 404 Page */
.error-404-wrapper {
  min-height: 550px;
  padding: 100px 5vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.error-404-wrapper h1 {
  font-size: clamp(48px, 8vw, 84px);
  margin: 0 0 15px;
}

.error-404-wrapper p {
  color: var(--muted);
  font-size: 11px;
  max-width: 480px;
  margin: 0 0 30px;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 800px) {
  .site-header {
    padding: 0 5vw;
  }

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

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .nav.open {
    display: flex;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    padding: 25px 5vw;
    background: var(--paper);
    flex-direction: column;
    gap: 18px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
  }

  .hero {
    padding: 60px 7vw;
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .hero-image {
    max-width: 420px;
    width: 100%;
    margin-inline: auto;
  }

  .hero h1 {
    font-size: clamp(42px, 11vw, 62px);
  }

  .statement {
    min-height: 320px;
  }

  .statement h2 {
    font-size: 27px;
  }

  .expertise {
    display: block;
    padding: 60px 7%;
  }

  .section-label {
    margin-bottom: 35px;
    font-size: 21px;
  }

  .expertise-btn {
    padding: 17px 0;
    font-size: 8px;
  }

  .expertise-item.active .expertise-btn {
    font-size: 14px;
  }

  .expertise-description p {
    font-size: 8px;
  }

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

  .book-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 12px;
  }

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

  .quote-section {
    min-height: 430px;
    padding: 80px 7%;
  }

  .quote {
    grid-template-columns: 180px 1fr;
    gap: 35px;
  }

  .quote-image {
    max-width: 180px;
  }

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

  .footer p {
    margin-top: 30px;
  }
}

@media (max-width: 600px) {
  .book-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .quote {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-left: 20px;
  }

  .quote-image {
    max-width: 130px;
  }
}

/* ==========================================================================
   ELEMENTOR INTEGRATION & COMPATIBILITY STYLES
   ========================================================================== */
.site-main--fullwidth,
.site-main--canvas {
  width: 100%;
  max-width: 100%;
  padding: 0;
  margin: 0;
}

.elementor-page-content {
  width: 100%;
}

.elementor-widget-margaret_hero .hero,
.elementor-widget-margaret_statement .statement,
.elementor-widget-margaret_expertise .expertise,
.elementor-widget-margaret_books .books-section,
.elementor-widget-margaret_newsletter .newsletter,
.elementor-widget-margaret_about_story .project-story {
  width: 100%;
}

body.elementor-page .site-main {
  overflow-x: hidden;
}

