/*
Theme Name: Hashim Mahmood
Theme URI: https://hashimmahmood.com
Author: Hashim Mahmood
Description: Custom theme for hashimmahmood.com — modern, readable, original copy.
Version: 1.2.1
Text Domain: hashim-mahmood
*/

:root {
  --black: #111111;
  --text: #1c1917;
  --muted: #57534e;
  --hero: #1c1917;
  --gold: #a3852b;
  --gold-2: #c4a35a;
  --white: #fffcf8;
  --paper: #fffcf8;
  --line: #e7e0d6;
  --max: 1120px;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--sans);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin: 0 0 .55em;
  text-wrap: balance;
}
p { margin: 0 0 1.15em; }
::selection { background: #ead9a8; color: #111; }

.wrap { width: min(var(--max), calc(100% - 48px)); margin: 0 auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 252, 248, .82);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 28px; padding: 16px 0; min-height: 72px;
}
.brand { text-decoration: none; display: block; line-height: 1.15; }
.brand-name {
  font-size: 22px; font-weight: 600; letter-spacing: -0.04em; display: block;
}
.brand-tag {
  font-size: 12px; font-weight: 400; color: var(--muted);
  display: block; margin-top: 3px; letter-spacing: 0.01em;
}

.nav { display: flex; align-items: center; gap: 32px; }
.nav-list { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-list > li { position: relative; }
.nav-list a, .nav-list span {
  text-decoration: none; font-size: 15px; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  letter-spacing: -0.01em;
}
.nav-list > li.current > a { border-bottom: 1.5px solid #111; padding-bottom: 2px; }
.nav-list .caret { font-size: 7px; opacity: .55; }
.dropdown {
  display: none; position: absolute; top: 100%; left: 0;
  background: #fff; min-width: 280px; padding: 8px 0;
  box-shadow: 0 16px 40px rgba(28, 25, 23, .12);
  border: 1px solid var(--line);
  border-radius: 14px;
  list-style: none; margin: 10px 0 0;
}
.nav-list li:hover > .dropdown, .nav-list li:focus-within > .dropdown { display: block; }
.dropdown a { display: block; padding: 11px 16px; white-space: nowrap; border-radius: 0; }
.dropdown a:hover { background: #f6f1e8; }

.social { display: flex; gap: 12px; align-items: center; }
.social a { width: 18px; height: 18px; color: #111; display: flex; opacity: .78; }
.social a:hover { opacity: 1; }
.social svg { width: 16px; height: 16px; fill: currentColor; }

.menu-toggle {
  display: none; background: none; border: 0; font-size: 22px; cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; padding: 13px 28px; text-decoration: none;
  font-size: 15px; font-weight: 500; letter-spacing: -0.01em;
  border: 1px solid #111; background: transparent; color: #111;
  cursor: pointer; line-height: 1; font-family: inherit;
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.btn:hover { background: #111; color: #fff; }
.btn-solid { background: #111; color: #fff; border-color: #111; }
.btn-solid:hover { background: #2a2623; }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn-ghost-light:hover { background: #fff; color: #111; }

/* Hero */
.hero {
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(196, 163, 90, .22), transparent 55%),
    var(--hero);
  color: #fff;
  text-align: center;
  padding: 128px 24px 136px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "CHANGE YOU WANT";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(40px, 8.5vw, 108px);
  font-weight: 600; letter-spacing: .18em;
  color: rgba(255,255,255,.05);
  pointer-events: none; white-space: nowrap;
  font-family: var(--sans);
}
.hero h1 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 600; position: relative;
  max-width: 820px; margin: 0 auto 22px;
  letter-spacing: -0.04em;
}
.hero .quote {
  font-family: var(--serif);
  font-style: italic; font-size: clamp(18px, 2.1vw, 22px);
  max-width: 640px; margin: 0 auto 36px;
  position: relative; line-height: 1.55;
  color: rgba(255,255,255,.88);
}
.hero .quote strong { font-style: italic; font-weight: 600; color: #fff; }

/* Split sections */
.section { padding: 104px 0; }
.section-dark {
  background: var(--hero); color: #fff;
}
.section-dark .wrap { max-width: 640px; }
.section-dark h2 { font-size: clamp(28px, 3.4vw, 40px); }
.section-dark p { color: rgba(255,255,255,.82); font-size: 18px; line-height: 1.65; }
.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center;
}
.split h2 { font-size: clamp(28px, 3.6vw, 42px); letter-spacing: -0.035em; }
.split .lede {
  color: var(--muted); font-size: 18px; line-height: 1.65;
  max-width: 460px; margin-bottom: 28px;
}
.split-right .copy { text-align: right; }
.split-right .lede { margin-left: auto; }
.split-right .btn { float: right; }
.portrait {
  width: min(380px, 100%); margin: 0 auto;
  border-radius: 50%;
}
.rounded-photo {
  width: min(520px, 100%);
  border-radius: 24px;
  object-fit: cover;
}
.blog-photo-wrap { position: relative; }

/* Forms */
.form-row input[type=email] {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 15px 22px;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  background: #fff;
}
.form-row input[type=email]:focus { border-color: #111; }
.section-dark .form-row input[type=email] { border-color: transparent; }
.form-row { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.mono { width: min(520px, 100%); border-radius: 24px; }

/* Footer */
.site-footer {
  background: linear-gradient(180deg, #1c1917 0%, #8d7328 58%, #a3852b 100%);
  color: #fff; padding: 64px 0 32px;
}
.site-footer .brand-name { font-size: 28px; letter-spacing: -0.04em; }
.site-footer .brand-name, .site-footer .brand-tag { color: #fff; }
.site-footer .brand-tag { font-size: 14px; opacity: .9; }
.site-footer .btn { background: #fff; color: #111; border-color: #fff; margin: 22px 0 36px; }
.site-footer .btn:hover { background: #111; color: #fff; border-color: #111; }
.copy-note { font-size: 13px; opacity: .85; letter-spacing: .02em; }

/* Page / post */
.page-hero {
  background:
    radial-gradient(1.5px 1.5px at 12% 28%, rgba(255,255,255,.45) 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 62%, rgba(255,255,255,.28) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 44% 18%, rgba(255,255,255,.35) 50%, transparent 51%),
    radial-gradient(1px 1px at 61% 74%, rgba(255,255,255,.3) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 78% 32%, rgba(255,255,255,.4) 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 58%, rgba(255,255,255,.22) 50%, transparent 51%),
    radial-gradient(900px 380px at 50% -20%, rgba(196, 163, 90, .2), transparent 50%),
    var(--hero);
  color: #fff; text-align: center;
  padding: 108px 24px 96px;
}
.page-hero h1 { font-size: clamp(36px, 6vw, 64px); letter-spacing: -0.045em; }
.page-hero p { opacity: .88; font-size: 19px; font-family: var(--serif); font-style: italic; }

.entry {
  width: min(680px, calc(100% - 48px));
  margin: 72px auto 112px;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.8;
  font-optical-sizing: auto;
  color: #292524;
}
.entry h1, .entry h2, .entry h3 {
  font-family: var(--sans);
  letter-spacing: -0.03em;
  color: var(--text);
}
.entry h1, .entry h2 { margin-top: 1.6em; }
.entry p { margin-bottom: 1.25em; }
.entry a { text-decoration: underline; text-underline-offset: 3px; }

.post-head { text-align: center; padding: 80px 24px 8px; }
.post-head h1 {
  font-size: clamp(34px, 5vw, 54px);
  letter-spacing: -0.045em;
  max-width: 18ch;
  margin: 0 auto .5em;
}
.post-head .excerpt {
  font-family: var(--serif);
  font-style: italic;
  color: var(--muted);
  font-size: 20px;
  max-width: 620px;
  margin: 0 auto 10px;
  line-height: 1.5;
}
.read-time {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 500;
}

/* Books */
.books-grid {
  width: min(740px, calc(100% - 48px));
  font-size: 19px;
  line-height: 1.78;
}
.books-grid > h1:first-child,
.books-grid > .wp-block-heading:first-child { display: none; }
.books-grid > h3:first-of-type,
.books-grid h3:first-of-type {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gold);
  margin: 0 0 2.5em;
}
.books-grid h2 {
  font-family: var(--sans);
  font-size: clamp(22px, 2.6vw, 28px);
  letter-spacing: -0.03em;
  margin: 2.8em 0 .4em;
  padding-top: 1.6em;
  border-top: 1px solid var(--line);
}
.books-grid h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.books-grid h2 + p {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin: 0 0 1.15em;
  line-height: 1.4;
}

@media (max-width: 860px) {
  .wrap { width: min(var(--max), calc(100% - 32px)); }
  .menu-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); padding: 16px 24px 28px;
    border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch;
  }
  .nav.open { display: flex; }
  .nav-list { flex-direction: column; align-items: flex-start; gap: 14px; }
  .dropdown { position: static; display: block; box-shadow: none; padding: 4px 0 4px 8px; border: 0; }
  .social { margin-top: 14px; }
  .split, .split-right { grid-template-columns: 1fr; gap: 32px; }
  .split-right .copy, .split-right .lede { text-align: left; }
  .split-right .btn { float: none; }
  .hero { padding: 88px 20px 96px; }
  .section { padding: 64px 0; }
  .entry, .books-grid { font-size: 18px; }
}

.hm-hp { position:absolute; left:-9999px; height:0; overflow:hidden; }
.hm-note { font-size: 16px; margin-top: 8px; }
.hm-signup .hm-err { color: #b42318; font-size: 14px; margin: 0; }
