/* ---- Tokens: ported from the live khadush.com ---- */
:root {
  --bg: #191919;
  --surface: #2d2d2d;
  --border: #333;
  --accent: #00cf82;
  --heading: #ececec;
  --body: #c2c2c2;
  --muted: #8a8f98;

  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: -apple-system, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --text: 17.5px;

  --wrap: 1120px;
  --measure: 720px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-size: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--heading);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.25rem; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0 0 1.2em; }
img { max-width: 100%; height: auto; display: block; }
hr { border: 0; border-top: 1px solid var(--border); margin: 3rem 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.measure { max-width: var(--measure); }
.eyebrow {
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .75rem;
  font-weight: 600;
}
.muted { color: var(--muted); font-size: .9rem; }

/* ---- Header ---- */
.site-header {
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
  background: rgba(25,25,25,.92);
  backdrop-filter: saturate(140%) blur(8px);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--heading); font-weight: 700; font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand .dot { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); flex: none; }
.site-nav { display: flex; gap: 26px; font-size: .95rem; }
.site-nav a { color: var(--body); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent); text-decoration: none; }

/* ---- Hero ---- */
.hero { padding: 96px 0 72px; border-bottom: 1px solid var(--border); }
.hero h1 { max-width: 16ch; }
.hero p { max-width: 56ch; font-size: 1.1rem; }
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 2rem; }

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 6px;
  font-size: .95rem;
  font-weight: 600;
  border: 1px solid var(--accent);
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #10241c; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { color: var(--accent); background: transparent; }
.btn-ghost:hover { background: rgba(0,207,130,.1); }

/* ---- Sections ---- */
.section { padding: 72px 0; border-bottom: 1px solid var(--border); }
.section-head { margin-bottom: 40px; }

/* ---- Post list ---- */
.post-list { display: grid; gap: 0; }
.post-item { padding: 32px 0; border-bottom: 1px solid var(--border); }
.post-item:last-child { border-bottom: 0; }
.post-item h3 { font-size: clamp(1.3rem, 2.4vw, 1.65rem); margin-bottom: .4rem; }
.post-item h3 a { color: var(--heading); }
.post-item h3 a:hover { color: var(--accent); text-decoration: none; }
.post-item p { margin-bottom: .8rem; }
.read-more { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }

/* ---- Work grid ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.card:hover { border-color: var(--accent); }
.card .thumb { aspect-ratio: 16/10; background: #222; border-bottom: 1px solid var(--border); overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 20px 22px 24px; }
.card h3 { margin-bottom: .35rem; }
.card h3 a { color: var(--heading); }
.card h3 a:hover { color: var(--accent); text-decoration: none; }
.card p { font-size: .95rem; margin: 0; }
.tags { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: .72rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--border);
  padding: 3px 9px; border-radius: 99px;
}

/* ---- Article ---- */
.article { padding: 72px 0 88px; }
.article-head { margin-bottom: 40px; }
.article-body { max-width: var(--measure); font-size: var(--text); }
.article-body h2 { margin-top: 2.4em; }
.article-body h3 { margin-top: 2em; }
.article-body blockquote {
  margin: 2em 0; padding: 4px 0 4px 24px;
  border-left: 3px solid var(--accent);
  color: var(--heading); font-family: var(--serif); font-style: italic;
}
.article-body ul, .article-body ol { padding-left: 1.3em; margin: 0 0 1.4em; }
.article-body li { margin-bottom: .5em; }
.article-body code {
  background: var(--surface); padding: 2px 6px; border-radius: 4px;
  font-size: .9em; color: var(--heading);
}
.article-body pre { background: var(--surface); padding: 18px; border-radius: 8px; overflow-x: auto; }
.article-body pre code { background: none; padding: 0; }
.cover { border-radius: 10px; margin-bottom: 40px; }

/* ---- Footer ---- */
.site-footer { padding: 56px 0; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer a { color: var(--body); }
.site-footer a:hover { color: var(--accent); }
.socials { display: flex; gap: 20px; }

/* ---- Pagination ---- */
.pager { display: flex; gap: 12px; justify-content: center; padding: 48px 0 0; }
.pager a, .pager span {
  padding: 8px 14px; border: 1px solid var(--border); border-radius: 6px; font-size: .9rem;
}
.pager span { color: var(--muted); }

@media (max-width: 600px) {
  .hero { padding: 64px 0 48px; }
  .section { padding: 52px 0; }
}

/* ---- About page ---- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }
.about-aside { position: sticky; top: 100px; display: grid; gap: 20px; }
.portrait { margin: 0; }
.portrait img { border-radius: 10px; width: 100%; }
.portrait figcaption { font-size: .82rem; color: var(--muted); margin-top: 10px; line-height: 1.5; }
.about-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 20px 22px;
}
.about-card p { font-size: .92rem; margin-bottom: 1rem; }
.about-card .eyebrow { margin-bottom: .6rem; }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.link-list a { font-size: .95rem; }

@media (max-width: 880px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-aside { position: static; max-width: 420px; }
}

/* ---- Imported case study content ---- */
.article-body img {
  border-radius: 8px;
  margin: 2rem 0 .6rem;
  border: 1px solid var(--border);
}
.article-body figure { margin: 2.4rem 0; }
.article-body figure img { margin: 0 0 .6rem; }
.article-body figcaption,
.article-body img + em {
  display: block;
  font-size: .85rem;
  color: var(--muted);
  font-style: normal;
  line-height: 1.5;
  margin-bottom: 2rem;
}
.article-body p > img:only-child { margin-bottom: 2rem; }
.article-body a { word-break: break-word; }
.article-body hr { margin: 2.5rem 0; }
.article-body table { margin: 2rem 0; font-size: var(--text); text-align: left; }
.article-body iframe { max-width: 100%; border-radius: 8px; margin: 2rem 0; }

/* card thumb is a link now */
.card .thumb { display: block; }
.card .thumb:hover { opacity: .88; }

/* ---- Client logos ---- */
.clients { padding: 56px 0; border-bottom: 1px solid var(--border); }
.client-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}
.client-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  min-height: 96px;
  display: flex; align-items: center; justify-content: center;
  padding: 20px 24px;
  transition: border-color .15s ease;
}
.client-card:hover { border-color: var(--accent); }
.client-card img {
  max-height: 40px; max-width: 100%; width: auto;
  object-fit: contain;
  filter: grayscale(1) brightness(1.9);
  opacity: .72;
  transition: opacity .15s ease, filter .15s ease;
}
.client-card:hover img { filter: grayscale(0) brightness(1.15); opacity: 1; }

/* ---- Article cards (Medium) ---- */
.grid--articles { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.article-card .body { display: flex; flex-direction: column; gap: .1rem; height: 100%; }
.article-card h3 { font-size: 1.22rem; line-height: 1.35; margin: .35rem 0 .5rem; }
.article-card h3 a { color: var(--heading); }
.article-card p { color: var(--body); font-size: .95rem; }
.article-card .muted { color: var(--muted); margin-bottom: 0; }
.article-card .read-more { color: var(--accent); margin-top: auto; padding-top: 1rem; }
.article-card:hover h3 a { color: var(--accent); }
.more-link { margin-top: 32px; }

/* ---- Obfuscated email link ---- */
.email-link { cursor: pointer; }

/* ---- WordPress spec tables (Project / Timeline / Role) ---- */
.article-body table {
  display: block;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
}
.article-body table td { border: 0; border-bottom: 1px solid var(--border); padding: 13px 20px; vertical-align: top; }
.article-body table tr:last-child td { border-bottom: 0; }
.article-body table td:first-child {
  color: var(--heading); font-weight: 600; white-space: nowrap;
  width: 1%; border-right: 1px solid var(--border);
}
.article-body table td strong { font-weight: 600; }

/* ---------- blog ---------- */
.page-head { padding: 88px 0 8px; }
.page-head h1 { margin-bottom: .6rem; }
.section--flush { padding-top: 40px; border-bottom: 0; }

.post-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  color: var(--muted); font-size: .85rem; margin-bottom: .7rem;
}
.chip {
  color: var(--accent); border: 1px solid rgba(0,207,130,.35);
  border-radius: 999px; padding: 3px 10px;
  font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700;
}

.post-item { display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: start; }
.post-item__thumb {
  aspect-ratio: 4/3; border-radius: 8px; border: 1px solid var(--border);
  background: #222; overflow: hidden;
}
.post-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-item__body h2,
.post-item__body h3 { font-size: clamp(1.25rem, 2.2vw, 1.55rem); margin-bottom: .5rem; }
.post-item__body h2 a,
.post-item__body h3 a { color: var(--heading); }
.post-item:hover h2 a,
.post-item:hover h3 a { color: var(--accent); }
.post-item__body p { font-size: .97rem; color: var(--body); margin-bottom: .9rem; }
.post-item { position: relative; }
.post-item h2 a::after,
.post-item h3 a::after { content: ""; position: absolute; inset: 0; }

.lede { color: var(--muted); font-size: 1.05rem; }

.post-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--border);
}
.post-nav__item {
  display: block; padding: 18px 20px; border: 1px solid var(--border); border-radius: 10px;
  color: var(--heading); font-size: .95rem; line-height: 1.4;
}
.post-nav__item:hover { border-color: var(--accent); text-decoration: none; }
.post-nav__item .read-more { display: block; color: var(--muted); margin-bottom: 6px; }
.post-nav__item--right { text-align: right; grid-column: 2; }

@media (max-width: 700px) {
  .post-item { grid-template-columns: 1fr; gap: 16px; }
  .post-item__thumb { aspect-ratio: 16/9; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav__item--right { grid-column: 1; text-align: left; }
}

/* ---------- hero portrait ---------- */
.hero-grid { display: grid; grid-template-columns: 1fr 420px; gap: 72px; align-items: center; }
.hero-portrait { position: relative; justify-self: end; }

/* Offset accent frame sitting behind the photo. */
.hero-portrait::before {
  content: ""; position: absolute; inset: 22px -22px -22px 22px;
  border: 1px solid rgba(0, 207, 130, .38); border-radius: 20px;
  pointer-events: none;
}
/* Soft accent bloom so the photo sits in the page rather than on top of it. */
.hero-portrait::after {
  content: ""; position: absolute; inset: -12%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 207, 130, .16), transparent 72%);
  filter: blur(28px); pointer-events: none;
}
.hero-portrait img {
  position: relative; z-index: 1;
  width: 420px; aspect-ratio: 4 / 5; height: auto;
  object-fit: cover; object-position: 50% 18%;
  border-radius: 20px;
  /* Flipped so Rohit faces the headline rather than away from it. */
  transform: scaleX(-1);
  filter: grayscale(1) contrast(1.08) brightness(1.02);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
}

@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr 320px; gap: 48px; }
  .hero-portrait img { width: 320px; }
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-portrait { justify-self: start; order: -1; }
  .hero-portrait::before { inset: 14px -14px -14px 14px; border-radius: 16px; }
  .hero-portrait img { width: 200px; border-radius: 16px; box-shadow: 0 16px 36px rgba(0,0,0,.5); }
}

/* ---------- embedded video ---------- */
.video { position: relative; aspect-ratio: 16/9; margin: 2rem 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- image captions ----------
   WordPress figcaptions land as the paragraph right after a lone image.
   Style them as captions instead of body copy. */
.article-body p:has(> img:only-child) { margin-bottom: .5rem; }
.article-body p:has(> img:only-child) + p,
.article-body p:has(> a > img:only-child) + p {
  color: var(--muted); font-size: .88rem; line-height: 1.5;
  margin-bottom: 2rem; padding-left: 2px;
}

/* Posts with no cover image keep the grid even with a typographic tile. */
.post-item__thumb--blank {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, #232323, #1c1c1c);
  padding: 10px;
}
.post-item__thumb--blank span {
  font-family: var(--serif); font-size: 1.05rem; line-height: 1.2;
  color: var(--muted); text-align: center;
}
.section--medium { padding-top: 56px; }
