/* ============================================================
   IQRAM AHMED PORTFOLIO — home.css
   Homepage specific styles
   ============================================================ */


/* ----------------------------------------------------------
   HERO SECTION
   Grid: left-rail | content | photo | right-rail
   Photo column sits between content and right rail,
   filling the full hero height with portrait image.
---------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: var(--hero-side-width) 1fr 340px var(--hero-side-width);
  min-height: 600px;
  border-bottom: var(--border-default);
  position: relative;
  overflow: hidden;
}

/* Side rails */
.hero__side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) 0;
  border-right: var(--border-default);
  z-index: 2;
}

.hero__side--right {
  border-right: none;
  border-left: var(--border-default);
}

.hero__side-text {
  font-size: var(--text-xs);
  color: var(--color-text-ghost);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  writing-mode: vertical-rl;
  user-select: none;
}

.hero__side-num {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  color: var(--color-text-ghost);
  font-style: italic;
}

/* Hero main — content column */
.hero__main {
  display: grid;
  grid-template-rows: 1fr auto;
  min-width: 0;
  z-index: 2;
}

.hero__top {
  padding: var(--space-8) var(--space-7) var(--space-6);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero__inner {
  position: relative;
  z-index: 2;
}

/* Kicker */
.hero__kicker {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
}

.hero__kicker-line {
  width: 36px;
  height: 1px;
  background: var(--color-accent);
  flex-shrink: 0;
}

.hero__kicker-text {
  font-size: var(--text-xs);
  color: var(--color-accent);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
}

.hero__kicker-sep {
  width: 1px;
  height: 10px;
  background: var(--color-border-mid);
  flex-shrink: 0;
}

.hero__kicker-loc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: var(--tracking-wide);
}

/* Headline */
.hero__h1 {
  font-family: var(--font-display);
  font-weight: 300;
  margin-bottom: var(--space-5);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

.hero__h1-intro {
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: 300;
  color: var(--color-text-muted);
  display: block;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.hero__h1-a {
  font-size: var(--text-hero);
  color: var(--color-text-primary);
  display: block;
}

/* "Design." — lifted to visible dark grey */
.hero__h1-b {
  font-size: var(--text-hero);
  color: #383838;
  display: block;
}

.hero__h1-c {
  font-size: var(--text-hero);
  color: var(--color-accent);
  display: block;
  font-style: italic;
}

/* Body text */
.hero__body {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-text-tertiary);
  max-width: 480px;
}

/* Stats + CTA bar */
.hero__bar {
  display: grid;
  grid-template-columns: 1fr 1px 1fr 1px 1fr 1px minmax(180px, auto);
  border-top: var(--border-default);
}

.hero__bar-cell {
  padding: 20px var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero__bar-divider {
  background: var(--color-border);
}

.hero__bar-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}

.hero__bar-value {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 300;
  color: var(--color-text-primary);
  letter-spacing: var(--tracking-snug);
}

.hero__bar-value sup {
  font-size: var(--text-sm);
  color: var(--color-accent);
  vertical-align: super;
}

.hero__bar-cta {
  padding: 20px var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}


/* ----------------------------------------------------------
   HERO PHOTO COLUMN
   Portrait image fills the column as a CSS background.
   Two gradient overlays dissolve edges into the dark background.
   CSS grayscale filter applied — remove if your photo is
   already black and white to avoid double processing.
---------------------------------------------------------- */
.hero__photo {
  position: relative;
  background-color: var(--color-bg-raised);
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  overflow: hidden;
  filter: grayscale(100%) contrast(1.05) brightness(0.88);
}

/* Ambient glow — very low opacity amber bloom beneath the photo.
   Adds warmth without being a visible effect. Remove if using
   a light or high-key portrait photo. */
.hero__photo::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 50% 92%,
    rgba(200, 131, 42, 0.07) 0%,
    transparent 68%
  );
}

/* Empty state — no featured image set yet */
.hero__photo--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: none;
  border-left: var(--border-default);
}

.hero__photo-placeholder {
  padding: var(--space-4);
  text-align: center;
}

.hero__photo-placeholder span {
  font-size: var(--text-sm);
  color: var(--color-text-ghost);
  line-height: 1.6;
  display: block;
  max-width: 200px;
}

/* Gradient fade overlays */
.hero__photo-fade {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

/* Left edge — bleeds photo into headline */
.hero__photo-fade--left {
  top: 0;
  left: 0;
  bottom: 0;
  width: 160px;
  background: linear-gradient(to right,
      #0A0A0A 0%,
      rgba(10, 10, 10, 0.65) 40%,
      transparent 100%);
}

/* Bottom edge — dissolves into the stats bar */
.hero__photo-fade--bottom {
  left: 0;
  right: 0;
  bottom: 0;
  height: 100px;
  background: linear-gradient(to top,
      #0A0A0A 0%,
      rgba(10, 10, 10, 0.5) 50%,
      transparent 100%);
}


/* ----------------------------------------------------------
   SELECTED WORK
---------------------------------------------------------- */
.work {
  border-bottom: var(--border-default);
}

.work__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--space-5);
  border-bottom: var(--border-default);
}

/* Project row */
.project {
  display: grid;
  grid-template-columns: var(--hero-side-width) minmax(0, 1fr) 260px 300px;
  align-items: stretch;
  border-bottom: var(--border-subtle);
  cursor: pointer;
  transition: background var(--transition-fast);
  text-decoration: none;
  color: inherit;
}

.project:last-child {
  border-bottom: none;
}

.project:hover {
  background: var(--color-bg-secondary);
}

.project:hover .project__name {
  color: var(--color-accent);
}

.project__index {
  border-right: var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}

.project__index-num {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  color: var(--color-text-ghost);
  font-style: italic;
}

.project__info {
  padding: var(--space-4);
  border-right: var(--border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.project__category {
  font-size: var(--text-xs);
  color: var(--color-accent);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}

.project__name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 300;
  color: var(--color-text-primary);
  letter-spacing: var(--tracking-snug);
  line-height: 1.25;
  transition: color var(--transition-fast);
}

/*
.project__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}*/

.project__thumb {
  border-right: var(--border-subtle);
  background: var(--color-bg-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 120px;
}

.project__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.65);
  transition: filter var(--transition-slow);
}

.project:hover .project__thumb img {
  filter: saturate(1);
}

/* Subtle lift — only enabled by JS on fine-pointer devices,
   so touch screens never get a stuck hover scale. */
.project__thumb.thumb-lift-enabled img {
  transition: filter var(--transition-slow), transform 350ms ease;
}

.project:hover .project__thumb.thumb-lift-enabled img {
  transform: scale(1.035);
}

.project__outcome {
  padding: var(--space-4) var(--space-3);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  position: relative;
}

/* Arrow indicator — slides in from left on row hover */
.project__outcome::after {
  content: '→';
  position: absolute;
  bottom: var(--space-4);
  right: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-accent);
  opacity: 0;
  transform: translateX(-6px);
  transition:
    opacity var(--transition-base),
    transform var(--transition-base);
  pointer-events: none;
}

.project:hover .project__outcome::after {
  opacity: 1;
  transform: translateX(0);
}

.project__outcome-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}

.project__outcome-num {
  font-family: var(--font-display);
  font-size: 2.125rem;
  font-weight: 200;
  color: var(--color-accent);
  letter-spacing: var(--tracking-tight);
  line-height: 1;
}

.project__outcome-text {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 300;
  color: var(--color-accent-muted);
  letter-spacing: var(--tracking-snug);
  line-height: 1.25;
}

.project__outcome-desc {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  line-height: 1.55;
}


/* ----------------------------------------------------------
   TESTIMONIAL + ABOUT — split panel
---------------------------------------------------------- */
.home-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: var(--border-default);
}

.testimonial {
  padding: var(--space-7) var(--space-6);
  border-right: var(--border-default);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-5);
}

.testimonial__mark {
  font-family: var(--font-display);
  font-size: 80px;
  font-weight: 200;
  color: #1E1E1E;
  line-height: 0.7;
  margin-bottom: var(--space-2);
  user-select: none;
  /* Delayed fade — appears slightly after the card itself,
     so the quote mark feels like it settles in rather than
     arriving with everything else at once. */
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 450ms ease 280ms, transform 450ms ease 280ms;
}

.testimonial.is-visible .testimonial__mark {
  opacity: 1;
  transform: translateY(0);
}

.testimonial__body {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-style: italic;
}

.testimonial__author-name {
  font-size: var(--text-md);
  font-weight: 500;
  color: var(--color-text-primary);
  margin-bottom: 4px;
  font-family: var(--font-body);
}

.testimonial__author-role {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-family: var(--font-body);
}

.home-about {
  background: var(--color-bg-secondary);
  display: flex;
  flex-direction: column;
}

.home-about__top {
  padding: var(--space-7) var(--space-6);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-bottom: var(--border-default);
  gap: var(--space-5);
}

.home-about__body {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--color-text-secondary);
  letter-spacing: var(--tracking-snug);
}

.home-about__link {
  font-size: var(--text-sm);
  color: var(--color-accent);
  text-decoration: none;
  letter-spacing: 0.04em;
  display: inline-block;
  transition: opacity var(--transition-fast);
}

.home-about__link:hover {
  opacity: 0.7;
}

.home-about__facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.home-about__fact {
  padding: 20px var(--space-3);
  border-right: var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.home-about__fact:last-child {
  border-right: none;
}

.home-about__fact-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.home-about__fact-value {
  color: var(--color-text-tertiary);
  line-height: 1.5;
}


/* ----------------------------------------------------------
   CONTACT STRIP
   Shared component — styles here apply on homepage.
   The same .contact-strip class is used on about, single,
   and casestudies pages. Those pages enqueue their own CSS
   files — add the contact-strip block there too, or move
   it to global.css to avoid repetition.
   NOTE: this is the canonical definition of contact-strip.
---------------------------------------------------------- */
.contact-strip {
  padding: var(--space-7) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  border-bottom: var(--border-default);
  background: var(--color-bg-secondary);
}


.contact-strip__headline {
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 300;
  color: var(--color-text-primary);
  letter-spacing: var(--tracking-snug);
  line-height: 1.3;
}

.contact-strip__headline em {
  font-style: italic;
  color: var(--color-accent);
}

.contact-strip__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2);
  flex-shrink: 0;
}




/* ----------------------------------------------------------
   RESPONSIVE — TABLET (1024px)
---------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: var(--hero-side-width) 1fr 260px var(--hero-side-width);
  }

  .hero__top {
    padding: var(--space-7) var(--space-5) var(--space-5);
  }

  .hero__photo-fade--left {
    width: 120px;
  }

  .project {
    grid-template-columns: var(--hero-side-width) minmax(0, 1fr) 200px 170px;
  }
}


/* ----------------------------------------------------------
   RESPONSIVE — MOBILE (768px)
   On mobile the photo becomes a banner at the top.
---------------------------------------------------------- */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    overflow: visible;
  }

  .hero__photo {
    order: -1;
    height: 300px;
    width: 100%;
    filter: grayscale(100%) contrast(1.05) brightness(0.85);
    border-bottom: var(--border-default);
  }

  .hero__photo-fade--left {
    display: none;
  }

  .hero__photo-fade--bottom {
    height: 80px;
  }

  .hero__side {
    display: none;
  }

  .hero__main {
    order: 0;
  }

  .hero__top {
    padding: var(--space-5) var(--space-3) var(--space-4);
  }

  .hero__body {
    max-width: 100%;
    font-size: 1rem;
  }

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

  .hero__bar-divider {
    display: none;
  }

  .hero__bar-cell {
    padding: 16px var(--space-3);
  }

  .hero__bar-cta {
    grid-column: 1 / -1;
    border-top: var(--border-default);
    padding: var(--space-3);
    gap: var(--space-2);
  }

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

  .project__index {
    display: none;
  }

  .project__info {
    border-right: none;
    padding: var(--space-3);
  }

  .project__thumb {
    border-right: none;
    border-top: var(--border-subtle);
    border-bottom: var(--border-subtle);
    min-height: 200px;
  }

  .project__outcome {
    padding: var(--space-3);
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  .home-bottom {
    grid-template-columns: 1fr;
  }

  .testimonial {
    border-right: none;
    border-bottom: var(--border-default);
    padding: var(--space-5) var(--space-3);
  }

  .testimonial__body {
    font-size: 1rem;
  }

  .home-about__top {
    padding: var(--space-5) var(--space-3);
  }

  .home-about__body {
    font-size: 1.0625rem;
  }

  .contact-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
    padding: var(--space-5) var(--space-3);
  }

  .contact-strip__headline {
    font-size: 1.5rem;
  }

  .contact-strip__right {
    align-items: flex-start;
  }
}


/* ----------------------------------------------------------
   RESPONSIVE — SMALL MOBILE (430px)
   iPhone 15 Pro 393px, S22 Ultra 412px
---------------------------------------------------------- */
@media (max-width: 430px) {
  .hero__photo {
    height: 240px;
  }

  .hero__h1-a,
  .hero__h1-b,
  .hero__h1-c {
    font-size: 2.25rem;
  }

  .project__name {
    font-size: 1.0625rem;
  }

  .contact-strip__headline {
    font-size: 1.375rem;
  }

  .testimonial__body {
    font-size: 0.9375rem;
  }
}