/* =========================================================
   Mazhar — personal brand site
   Warm editorial design system
   ========================================================= */

* { box-sizing: border-box; }

:root {
  --cream: #f9f8f6;
  --band: #f4f1ea;
  --white: #ffffff;
  --ink: #1c1917;
  --text: #57534e;
  --muted: #78716c;
  --hairline: #e8e4dc;
  --terracotta: #bc4b35;
  --gold: #c9a227;
  --navy: #04194e;
  --sage: #5f6f65;

  --font-display: "Bebas Neue", Impact, "Arial Narrow Bold", sans-serif;
  --font-serif-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --section-pad: 112px;
}

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--text);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--cream);
  padding: 12px 20px;
  z-index: 200;
  font-family: var(--font-mono);
  font-size: 13px;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

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

h1, h2, h3, h4 { margin: 0; }

.container,
.section__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Eyebrow / mono labels */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--terracotta);
  font-weight: 500;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* =========================================================
   Nav
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(249, 248, 246, .82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}

.nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__wordmark {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: .12em;
  text-decoration: none;
  color: var(--ink);
}

.nav__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__links a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  transition: color .2s ease;
}
.nav__links a:hover { color: var(--terracotta); }

.nav__links a.nav__pill {
  border: 1px solid var(--terracotta);
  color: var(--terracotta);
  padding: 8px 16px;
  border-radius: 999px;
}
.nav__links a.nav__pill:hover {
  background: var(--terracotta);
  color: var(--white);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
}
.nav__toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--ink);
  transition: transform .2s ease, opacity .2s ease;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   Hero
   ========================================================= */
/* Dark full-bleed hero: the studio shot (cropped so subject + chair fill
   the frame) is anchored flush right at full height — never cropped — and
   the section background matches the photo's black backdrop so the two
   blend into one continuous image. Name/intro sit on the dark left side. */
.hero {
  position: relative;
  width: 100%;
  height: min(92vh, 60vw);
  min-height: 560px;
  background: #131110;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__media img {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: auto;
  display: block;
}
/* readability scrim over the right side; also blends the photo's right edge
   into the section background so no seam shows */
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(270deg,
    rgba(19, 17, 16, .82) 0%,
    rgba(19, 17, 16, .45) 34%,
    rgba(19, 17, 16, 0) 55%);
}

.hero__text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  padding: 80px 48px 80px 56px;
  max-width: 620px;
  height: 100%;
  margin-left: auto;
}

.hero__text .eyebrow { color: #e0745a; }

.hero__name {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* shrink-to-fit, not stretch -- needed so JS can
                               measure each line's true glyph width */
  margin: 0;
}

.hero__firstname {
  font-family: var(--font-display);
  font-size: clamp(64px, 9vw, 118px);
  line-height: .92;
  letter-spacing: .01em;
  color: var(--cream);
}

.hero__lastname {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(15px, 1.7vw, 22px);
  line-height: 1.4;
  color: var(--cream);
  /* letter-spacing is set from JS to stretch this to hero__firstname's width */
}

.hero__tagline {
  font-family: var(--font-serif-display);
  font-style: italic;
  font-size: clamp(20px, 2.2vw, 27px);
  color: #ece8e1;
  line-height: 1.4;
  max-width: 30ch;
}

.hero__subheading {
  font-family: var(--font-body);
  font-size: clamp(14px, 1.15vw, 16px);
  color: #a8a29e;
  line-height: 1.6;
  max-width: 42ch;
  margin-top: -8px;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 28px;
  margin-top: 12px;
}

.hero__stat-value {
  font-family: var(--font-display);
  font-size: 34px;
  color: #e0745a;
  line-height: 1;
}

.hero__stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #a8a29e;
  margin-top: 6px;
}

/* =========================================================
   Affiliation strip
   ========================================================= */
.affiliations {
  background: var(--white);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 40px 0;
}
.affiliations__list {
  list-style: none;
  margin: 0 auto;
  padding: 0 32px;
  max-width: 1180px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 56px;
}
.affiliations__list img {
  height: 28px;
  width: auto;
  filter: grayscale(1) opacity(.65);
  transition: filter .25s ease;
}
.affiliations__list li:hover img {
  filter: grayscale(0) opacity(1);
}

/* =========================================================
   Sections generic
   ========================================================= */
.section {
  position: relative;
  padding: var(--section-pad) 0;
  overflow: hidden;
}

.section__ghost-num {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 220px;
  line-height: 1;
  color: var(--ink);
  opacity: .05;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  white-space: nowrap;
}

.section__inner { position: relative; z-index: 1; }

.section-heading {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 56px;
}
.section-heading .eyebrow { font-size: 15px; }
.section-heading h2 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: .04em;
  color: var(--ink);
  text-transform: uppercase;
}

/* =========================================================
   About
   ========================================================= */
.about__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 64px;
  align-items: start;
}
.about__bio p {
  margin: 0 0 22px;
  font-size: 18px;
  color: var(--text);
}
.about__bio p:last-child { margin-bottom: 0; }

.about__aside {
  border: 1px solid var(--hairline);
  padding: 28px;
  background: var(--white);
}
.about__aside-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 18px;
  display: block;
}
.about__industries {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.about__industries li {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hairline);
}
.about__industries li:last-child { border-bottom: none; padding-bottom: 0; }

/* =========================================================
   Expertise
   ========================================================= */
.expertise__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.expertise__card {
  background: var(--white);
  border-top: 3px solid var(--terracotta);
  border-left: 1px solid var(--hairline);
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 32px 26px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.expertise__card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(28, 25, 23, .08);
}
.expertise__card h3 {
  font-family: var(--font-serif-display);
  font-size: 21px;
  color: var(--ink);
  margin-bottom: 10px;
}
.expertise__tags {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 14px;
  display: block;
}
.expertise__card p {
  margin: 0;
  font-size: 15.5px;
  color: var(--text);
}

/* =========================================================
   Experience timeline
   ========================================================= */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 32px;
  border-left: 1px solid var(--hairline);
  max-width: 780px;
}
.timeline li {
  position: relative;
  padding-bottom: 44px;
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -37px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--terracotta);
  border: 2px solid var(--cream);
}
.timeline__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 6px;
}
.timeline__org {
  font-family: var(--font-serif-display);
  font-size: 20px;
  color: var(--ink);
}
.timeline__role {
  font-size: 15.5px;
  color: var(--text);
  font-style: italic;
  font-family: var(--font-serif-display);
}
.timeline__dates,
.timeline__location {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.timeline__body {
  margin: 8px 0 0;
  font-size: 15.5px;
  color: var(--text);
  max-width: 62ch;
}

/* =========================================================
   Engagements — ticker
   ========================================================= */
.engagements__intro {
  font-family: var(--font-serif-display);
  font-style: italic;
  font-size: 19px;
  color: var(--ink);
  max-width: 60ch;
  margin: -28px 0 48px;
}

.ticker {
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden;
  margin: 0 -32px;
  padding: 4px 0;
}

.ticker__row {
  overflow: hidden;
  width: 100%;
}

.ticker__track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 50s linear infinite;
}
/* spacing lives on tiles (not gap/padding on the track) so each duplicated
   set is exactly 50% of the track and the loop point is seamless */
.ticker__track .tile { margin-right: 20px; }
.ticker__dup-wrap {
  display: contents;
}
.ticker__row--reverse .ticker__track {
  animation-name: ticker-scroll-reverse;
  animation-duration: 56s;
}

.ticker__row:hover .ticker__track {
  animation-play-state: paused;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes ticker-scroll-reverse {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .ticker__track {
    animation: none;
    overflow-x: auto;
  }
  .ticker__row {
    overflow-x: auto;
  }
  .ticker__dup-wrap {
    display: none;
  }
}

.tile {
  flex: 0 0 auto;
  width: 220px;
  background: var(--white);
  border: 1px solid var(--hairline);
  padding: 20px 18px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(28, 25, 23, .07);
}
.tile__logo-wrap {
  height: 34px;
  display: flex;
  align-items: center;
  margin-bottom: 14px;
}
.tile__logo-wrap img {
  height: 34px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: grayscale(1) opacity(.75);
  transition: filter .25s ease;
}
.tile:hover .tile__logo-wrap img {
  filter: grayscale(0) opacity(1);
}
.tile__wordmark {
  height: 34px;
  width: 34px;
  background: var(--band);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif-display);
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 14px;
}
.tile__name {
  font-size: 14.5px;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
}
.tile__meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* =========================================================
   Statement band
   ========================================================= */
.statement-band {
  background: var(--navy);
  padding: 96px 32px;
  text-align: center;
}
.statement-band__quote {
  font-family: var(--font-serif-display);
  font-style: italic;
  font-size: clamp(24px, 3.4vw, 38px);
  color: rgba(249, 248, 246, .92);
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.4;
}
.statement-band__rule {
  width: 40px;
  height: 2px;
  background: var(--gold);
  margin: 32px auto 0;
}

/* =========================================================
   Credentials
   ========================================================= */
.credentials__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 64px;
  align-items: start;
}
.credentials__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 20px;
  display: block;
}
.cert-list, .edu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.cert-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: baseline;
}
.cert-list li:first-child { padding-top: 0; }
.cert-list li:last-child { border-bottom: none; }
.cert-name {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.4;
}
.cert-issuer {
  font-size: 13px;
  color: var(--muted);
  display: block;
  margin-top: 3px;
}
.cert-year {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .05em;
  color: var(--terracotta);
  white-space: nowrap;
  flex-shrink: 0;
}

.edu-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
}
.edu-item:last-child { border-bottom: none; }
.edu-item img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: grayscale(1);
  flex-shrink: 0;
  margin-top: 2px;
}
.edu-degree {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.4;
}
.edu-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
  display: block;
}

/* =========================================================
   Lab
   ========================================================= */
.lab {
  position: relative;
  background: var(--band);
  padding: var(--section-pad) 0;
  overflow: hidden;
}
.lab .eyebrow { color: var(--sage); }
.lab .section-heading h2 { color: var(--ink); }
.lab__tagline {
  font-family: var(--font-serif-display);
  font-style: italic;
  font-size: 18px;
  color: var(--text);
  margin: -34px 0 48px;
  display: block;
}

.lab__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.lab__card {
  background: var(--white);
  border: 1px solid var(--hairline);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.lab__card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(28, 25, 23, .07);
}
.lab__card--placeholder {
  background: transparent;
  border: 1px dashed var(--hairline);
  align-items: flex-start;
  justify-content: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.lab__card h3 {
  font-family: var(--font-serif-display);
  font-size: 21px;
  color: var(--ink);
}
.lab__pill {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  border: 1px solid var(--sage);
  color: var(--sage);
  border-radius: 999px;
  padding: 4px 12px;
}
.lab__pill--live {
  border-color: #1f7a4d;
  color: #1f7a4d;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.lab__pill--live:hover,
.lab__pill--live:focus-visible {
  background: #1f7a4d;
  color: #fff;
}
.lab__tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.lab__card p {
  margin: 0;
  font-size: 15px;
  color: var(--text);
  flex-grow: 1;
}
.lab__link {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--terracotta);
  text-decoration: none;
  align-self: flex-start;
}
.lab__link:hover { text-decoration: underline; }

/* =========================================================
   Contact + footer
   ========================================================= */
.contact {
  padding: var(--section-pad) 0;
  text-align: center;
}
.contact .eyebrow {
  display: block;
  margin-bottom: 20px;
}
.contact__line {
  font-family: var(--font-serif-display);
  font-style: italic;
  font-size: clamp(20px, 2.6vw, 28px);
  color: var(--ink);
  max-width: 640px;
  margin: 0 auto 40px;
  line-height: 1.4;
}
.contact__email {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 56px);
  letter-spacing: .02em;
  color: var(--terracotta);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 24px;
  word-break: break-word;
}
.contact__email:hover { text-decoration: underline; }
.contact__linkedin {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}
.contact__linkedin:hover { color: var(--terracotta); }

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 28px 32px;
}
.footer__inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--muted);
}
.footer__inner a {
  color: var(--muted);
  text-decoration: none;
}
.footer__inner a:hover { color: var(--terracotta); }
.footer__links {
  display: flex;
  gap: 20px;
  align-items: center;
}

/* =========================================================
   Scroll reveal
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease-out, transform .6s ease-out;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger.is-visible > * {
  transition-delay: calc(var(--stagger-index, 0) * 80ms);
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger.is-visible > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 980px) {
  /* stacked hero: full photo first (nothing cropped) on the dark
     background, light text below it */
  .hero {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
  }
  .hero__media { position: static; order: -1; }
  .hero__media img {
    position: static;
    width: 100%;
    height: auto;
  }
  .hero__media::after { display: none; }
  .hero__text { padding: 48px 24px 64px; max-width: none; height: auto; }
  .about__grid,
  .credentials__grid { grid-template-columns: 1fr; }
  .expertise__grid,
  .lab__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav__wordmark { font-size: 16px; letter-spacing: .08em; }

  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--hairline);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 32px;
    display: none;
    gap: 18px;
  }
  .nav__links.is-open { display: flex; }
  .nav__toggle { display: flex; }

  .section__ghost-num { font-size: 120px; top: 24px; }
  :root { --section-pad: 72px; }

  .expertise__grid,
  .lab__grid { grid-template-columns: 1fr; }

  .hero__stats { grid-template-columns: repeat(2, auto); row-gap: 20px; }
  .cert-list li { flex-direction: column; align-items: flex-start; gap: 4px; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}
