/* ---------------------------------------------------------------------------
   mdanishs.com
   Self-contained stylesheet. No Bootstrap, no jQuery, no icon font CDN —
   the whole site is two font files and this file.
   --------------------------------------------------------------------------- */

:root {
  --paper: #fcfbf8;
  --paper-raised: #ffffff;
  --paper-sunk: #f4f1ea;
  --ink: #1c1a17;
  --ink-soft: #55504a;
  --ink-faint: #857e75;
  --rule: #e4dfd4;
  --accent: #a8451d;
  --accent-soft: #f6ede7;
  --accent-ink: #ffffff;

  --measure: 68ch;
  --shell: 1080px;
  --radius: 14px;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14130f;
    --paper-raised: #1c1a16;
    --paper-sunk: #100f0c;
    --ink: #f2eee6;
    --ink-soft: #b8b1a5;
    --ink-faint: #8a8377;
    --rule: #2e2a23;
    --accent: #e08b5f;
    --accent-soft: #26201a;
    --accent-ink: #14130f;
  }
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.15rem);
}
h2 {
  font-size: clamp(1.5rem, 3.2vw, 1.95rem);
  margin-top: 2.4em;
}
h3 {
  font-size: 1.2rem;
  margin-top: 2em;
}
h4 {
  font-size: 1.02rem;
  margin-top: 1.6em;
}

p,
ul,
ol {
  margin: 0 0 1.15em;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-thickness: 2px;
}

strong {
  font-weight: 650;
  color: var(--ink);
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 3rem 0;
}

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

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--paper-sunk);
  padding: 0.15em 0.4em;
  border-radius: 5px;
}

pre {
  background: var(--paper-sunk);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  overflow-x: auto;
}
pre code {
  background: none;
  padding: 0;
}

blockquote {
  margin: 1.6em 0;
  padding: 0.2em 0 0.2em 1.3em;
  border-left: 3px solid var(--accent);
  color: var(--ink-soft);
  font-style: italic;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5em;
}
th,
td {
  text-align: left;
  padding: 0.6em 0.8em;
  border-bottom: 1px solid var(--rule);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Visible to screen readers only. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.prose {
  max-width: var(--measure);
}

main {
  display: block;
  padding-bottom: 5rem;
}

.lede {
  font-size: 1.16rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   Header / nav
   -------------------------------------------------------------------------- */

.site-head {
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.site-head .shell {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 68px;
}

.brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-right: auto;
  white-space: nowrap;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}
.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
}

/* `.nav a` would otherwise out-specify `.btn` and make the CTA text
   the same colour as its own background. */
.nav a.btn {
  color: var(--accent-ink);
}
.nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

/* Resume download. Reads as a nav link, but carries a download glyph so it's
   distinguishable from the pages either side of it. */
.nav-resume {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.nav-resume svg {
  width: 14px;
  height: 14px;
  flex: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--rule);
  border-radius: 8px;
  color: var(--ink);
  padding: 0.45rem 0.7rem;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
  padding: 0.66rem 1.15rem;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 550;
  text-decoration: none;
  line-height: 1.3;
  transition: transform 0.12s ease, opacity 0.12s ease;
}
.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.btn-ghost:hover {
  border-color: var(--ink-faint);
}

.btn-sm {
  padding: 0.42rem 0.9rem;
  font-size: 0.86rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.8rem 0 0;
  align-items: center;
}

/* Friction-reducing microcopy under a primary CTA ("Free · 3 minutes · …"). */
.btn-note {
  margin: 0.8rem 0 0;
  font-size: 0.84rem;
  color: var(--ink-faint);
}
.band .btn-note {
  text-align: center;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2rem, 5vw, 3.5rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 232px;
  gap: clamp(2rem, 6vw, 4rem);
  align-items: center;
}

.hero h1 {
  margin-bottom: 0.35em;
}

.hero-portrait img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--rule);
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
}

/* Page header for interior pages */
.page-head {
  padding: clamp(2.5rem, 6vw, 4rem) 0 0;
}
.page-head h1 {
  margin-bottom: 0.3em;
}

/* --------------------------------------------------------------------------
   Answer block — the short, quotable summary near the top of key pages.
   Doubles as the passage answer engines are most likely to lift.
   -------------------------------------------------------------------------- */

.answer {
  background: var(--accent-soft);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin: 2rem 0;
  max-width: var(--measure);
}
.answer p:last-child {
  margin-bottom: 0;
}
.answer > .answer-label {
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* --------------------------------------------------------------------------
   Stats
   -------------------------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 2.5rem 0;
}

.stat {
  background: var(--paper-raised);
  padding: 1.3rem 1.25rem;
  display: flex;
  flex-direction: column;
}
.stat dt {
  font-size: 0.83rem;
  color: var(--ink-soft);
  margin: 0;
}
/* Markup is dt-then-dd so the <dl> stays valid; the number reads better on top. */
.stat dd {
  order: -1;
  font-family: var(--serif);
  font-size: 1.72rem;
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 0.25rem;
  letter-spacing: -0.02em;
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.15rem;
  margin: 2rem 0;
}

/* For sets of four, so they land 2x2 instead of an orphaned 3+1. */
.cards-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 620px) {
  .cards-2 {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.card h3 {
  margin-top: 0;
  font-size: 1.1rem;
}
.card p:last-child {
  margin-bottom: 0;
}
.card .card-meta {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-faint);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* --------------------------------------------------------------------------
   Experience / timeline
   -------------------------------------------------------------------------- */

.role {
  border-top: 1px solid var(--rule);
  padding: 2rem 0;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 2rem;
}
.role:last-child {
  border-bottom: 1px solid var(--rule);
}

.role-when {
  font-size: 0.86rem;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
  padding-top: 0.35rem;
}
.role-where {
  display: block;
  margin-top: 0.2rem;
}

.role h3 {
  margin: 0 0 0.15rem;
  font-size: 1.22rem;
}
.role .role-company {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 0.8rem;
}
.role ul {
  padding-left: 1.15rem;
  margin-bottom: 0;
}
.role li {
  margin-bottom: 0.45em;
}

/* --------------------------------------------------------------------------
   FAQ — rendered with <details> so it stays readable without JS and the text
   remains in the DOM for crawlers.
   -------------------------------------------------------------------------- */

.faq {
  max-width: var(--measure);
  margin: 2rem 0;
  border-top: 1px solid var(--rule);
}

.faq details {
  border-bottom: 1px solid var(--rule);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 2rem 1.1rem 0;
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 600;
  position: relative;
  color: var(--ink);
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--sans);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--accent);
}
.faq details[open] summary::after {
  content: "−";
}
.faq details > p {
  color: var(--ink-soft);
  padding-bottom: 1.2rem;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Pricing
   -------------------------------------------------------------------------- */

.tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.15rem;
  margin: 2rem 0;
}

.tier {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.6rem;
  background: var(--paper-raised);
  display: flex;
  flex-direction: column;
}
.tier.is-featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.tier h3 {
  margin: 0 0 0.1rem;
  font-size: 1.12rem;
}
.tier .price {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0.4rem 0 0.9rem;
}
.tier ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  font-size: 0.94rem;
  color: var(--ink-soft);
}
.tier li {
  padding-left: 1.35rem;
  position: relative;
  margin-bottom: 0.5em;
}
.tier li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
}
.tier .btn {
  margin-top: auto;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Callout / CTA band
   -------------------------------------------------------------------------- */

.band {
  background: var(--paper-sunk);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(1.8rem, 5vw, 2.8rem);
  margin: 4rem 0 0;
  text-align: center;
}
.band h2 {
  margin-top: 0;
}
.band p {
  max-width: 52ch;
  margin-left: auto;
  margin-right: auto;
  color: var(--ink-soft);
}
.band .btn-row {
  justify-content: center;
}

/* --------------------------------------------------------------------------
   Post list
   -------------------------------------------------------------------------- */

.post-list article {
  border-top: 1px solid var(--rule);
  padding: 1.9rem 0;
}
.post-list article:last-child {
  border-bottom: 1px solid var(--rule);
}
.post-list h2 {
  margin: 0 0 0.3rem;
  font-size: 1.35rem;
}
.post-list h2 a {
  color: var(--ink);
  text-decoration: none;
}
.post-list h2 a:hover {
  color: var(--accent);
}
.post-meta {
  font-size: 0.83rem;
  color: var(--ink-faint);
  margin-bottom: 0.7rem;
}
.post-list p {
  color: var(--ink-soft);
  margin-bottom: 0;
}

.tag-list a,
.blog-tags a {
  display: inline-block;
  font-size: 0.8rem;
  background: var(--paper-sunk);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  margin: 0 0.35rem 0.4rem 0;
  color: var(--ink-soft);
  text-decoration: none;
}
.tag-list a:hover,
.blog-tags a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 3rem 0 0;
  font-size: 0.92rem;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-foot {
  border-top: 1px solid var(--rule);
  margin-top: 4rem;
  font-size: 0.9rem;
  color: var(--ink-faint);
}

/* Follow block — the one place on every page asking for a social follow. */
.foot-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  align-items: center;
  justify-content: space-between;
  padding-top: 3rem;
  padding-bottom: 2.5rem;
}
.foot-cta-copy {
  max-width: 46ch;
}
.foot-cta h2 {
  margin: 0 0 0.35rem;
  font-size: 1.4rem;
}
.foot-cta p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.foot-cta-actions {
  text-align: center;
}
.foot-cta-actions .btn {
  white-space: nowrap;
}
.foot-proof {
  margin: 0.6rem 0 0;
  font-size: 0.82rem;
  color: var(--ink-faint);
}

.foot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
  align-items: center;
  border-top: 1px solid var(--rule);
  padding-top: 1.75rem;
  padding-bottom: 3rem;
}
.foot-meta p {
  margin: 0;
}
.site-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-right: auto;
}
.site-foot a:not(.btn) {
  color: var(--ink-soft);
  text-decoration: none;
}
.site-foot a:not(.btn):hover {
  color: var(--accent);
}

@media (max-width: 620px) {
  .foot-cta-actions {
    text-align: left;
  }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 760px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-portrait {
    order: -1;
    max-width: 132px;
  }
  .role {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .nav-toggle {
    display: block;
  }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper-raised);
    border-bottom: 1px solid var(--rule);
    padding: 0.5rem 1.5rem 1.25rem;
  }
  .nav.is-open {
    display: flex;
  }
  .nav a {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--rule);
    font-size: 1rem;
  }
  .nav .btn {
    margin-top: 0.9rem;
    text-align: center;
    border-bottom: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */

@media print {
  .site-head,
  .site-foot,
  .band,
  .btn-row {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
  }
}
