/* ==========================================================================
   Ali R. Tariq — portfolio
   Recreated from the Framer site (artariq.works).

   Breakpoints (same as the Framer project):
     ≥ 1440px        desktop (base styles)
     1200 – 1439px   small desktop
     810 – 1199px    tablet
     < 810px         phone
   ========================================================================== */

/* ---------- Fonts (self-hosted, latin subset) ---------- */
@font-face {
  font-family: "Bebas Neue";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/bebas-neue-400.woff2") format("woff2");
}
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/hanken-grotesk-400.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/inter-variable.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  --bg: #121212;
  --accent: #ff9e61;
  --white: #ffffff;
  --text-muted: #b5b5b5;
  --text-soft: #ebebeb;
  --headline: #ededed;
  --card: #212121;
  --icon-muted: #858585;
  --status: #51ff45;

  --font-display: "Bebas Neue", "Arial Narrow", sans-serif;
  --font-body: "Hanken Grotesk", system-ui, sans-serif;
  --font-ui: "Inter", system-ui, sans-serif;

  --gutter: 40px;
  --sticky-top: 64px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6, p, ul, figure {
  margin: 0;
  padding: 0;
}
ul {
  list-style: none;
}
img, video, svg {
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}

/* `clip` (not `hidden`) so position: sticky inside keeps working */
.page {
  padding-top: 64px;
  overflow-x: clip;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Shared type ---------- */
.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 124px;
  line-height: 1.2;
  color: var(--accent);
  text-transform: uppercase;
}
.section-lede {
  max-width: 640px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 21px;
  line-height: 1.4;
  letter-spacing: -0.04em;
  color: var(--text-soft);
}

/* ==========================================================================
   Ticker (infinite marquee) — used in the hero and for client logos.
   The list is rendered twice; the track slides by exactly one copy (-50%).
   ========================================================================== */
.ticker {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 10px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 12.5%, #000 87.5%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 12.5%, #000 87.5%, transparent 100%);
}
.ticker__track {
  display: flex;
  flex-shrink: 0;
  width: max-content;
  animation: ticker-scroll var(--ticker-duration, 60s) linear infinite;
}
.ticker__group {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 140px;
  padding-right: 140px; /* equals the gap so the loop seam is invisible */
}
.ticker__group li {
  flex-shrink: 0;
}
.ticker__group img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@keyframes ticker-scroll {
  to {
    transform: translateX(-50%);
  }
}

/* ==========================================================================
   Hero
   Layer order (back → front): project ticker, "Ali Rushdan", portrait
   (parallax), "Tariq", headline, status pill.
   ========================================================================== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
}

.hero__ticker {
  position: absolute;
  top: 28px;
  right: 0;
  bottom: 0;
  left: 0;
  opacity: 0.21;
}
.hero__ticker .ticker__track {
  --ticker-duration: 97s; /* ≈ 25px/s, matches the Framer ticker */
}

/* Giant name lines. Font size is a fixed ratio of the viewport width so the
   word always spans the same width (Framer's "fit text"). */
.hero__name {
  position: absolute;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1;
  color: var(--accent);
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}
.hero__name--first {
  top: 0;
  left: 50%;
  width: 95vw;
  transform: translateX(-50%);
  font-size: 26.944vw;
  letter-spacing: -0.04em;
}
.hero__name--last {
  bottom: -160px;
  left: 5vw;
  width: 95vw;
  font-size: 30.12vw;
  letter-spacing: 0.36em;
}

/* Portrait wrapper — JS moves this down at 20% of the scroll speed */
.hero__face {
  position: absolute;
  top: 68px;
  right: 0;
  bottom: 0;
  left: 0;
  will-change: transform;
}
.hero__portrait {
  position: absolute;
  top: 100.5px;
  right: 12.57%;
  bottom: 0;
  left: 12.57%;
}
.hero__portrait img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.hero__gradient {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 221px;
  background: linear-gradient(180deg, rgba(18, 18, 18, 0) 0%, var(--bg) 77%);
}

.hero__headline {
  position: absolute;
  top: 50%;
  right: 72px;
  left: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--headline);
  text-transform: uppercase;
}
.hero__headline p {
  white-space: nowrap;
}

.status-pill {
  position: absolute;
  top: -32px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 32px;
  padding: 0 16px;
  transform: translateX(-50%);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.2);
  font-family: var(--font-ui);
  font-size: 12px;
  line-height: 1.2;
  color: var(--white);
  white-space: nowrap;
}
.status-pill__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status);
}

/* ---------- Hero entrance animations ---------- */
.js .hero__portrait {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 1.6s var(--ease-out) 0.5s,
    transform 1.6s var(--ease-out) 0.5s;
}
.js .hero__headline .word {
  display: inline-block;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(10px);
  transition:
    opacity 0.8s var(--ease-out),
    filter 0.8s var(--ease-out),
    transform 0.8s var(--ease-out);
  transition-delay: calc(0.5s + var(--i, 0) * 0.1s);
}
.js.is-loaded .hero__portrait,
.js.is-loaded .hero__headline .word {
  opacity: 1;
  filter: blur(0);
  transform: none;
}

/* ==========================================================================
   About
   ========================================================================== */
.about {
  padding: 330px 0 82px;
}
.about__inner {
  display: flex;
  flex-direction: column;
  gap: 240px;
  padding: 0 var(--gutter);
}

.clients {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.clients__title {
  width: 100%;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--accent);
  text-align: center;
  text-transform: uppercase;
}
.clients__ticker {
  width: 100%;
  height: 185px;
  opacity: 0.21;
}
.clients__ticker .ticker__track {
  --ticker-duration: 62s; /* ≈ 40px/s */
}
.clients__ticker li > div {
  width: 100%;
  height: 100%;
  filter: brightness(0.7) grayscale(1) invert(1);
}

.about__content {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.about__text {
  display: flex;
  flex-direction: column;
  gap: 40px;
  font-family: var(--font-body);
  font-size: 42px;
  line-height: 1.2;
  color: var(--white);
}
.about__signature {
  width: 182px;
  height: 135px;
  overflow: visible;
}

/* ==========================================================================
   Work — each project has a sticky blurb on the left and media on the right
   ========================================================================== */
.work {
  padding: 82px var(--gutter);
}
.projects {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.project {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  padding: 80px 0;
}

.project__blurb {
  position: sticky;
  top: var(--sticky-top);
  flex: 0 0 300px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.project__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.2;
  color: var(--white);
  text-transform: uppercase;
}
.project__body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text-muted);
}

.live-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: -2px;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1;
  color: var(--white);
  text-transform: uppercase;
}
.live-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.live-link--lg {
  font-size: 24px;
  line-height: 0.9;
}

.project__media {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.media {
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--ar);
  border-radius: var(--r, 0);
}
.media > img,
.media > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media--r8 { --r: 8px; }
.media--r16 { --r: 16px; }
.media--fixed {
  aspect-ratio: auto;
  height: var(--h);
}

.media-row {
  display: flex;
  gap: 10px;
}
.media-row > .media {
  flex: 1 1 0;
  min-width: 0;
}

/* ==========================================================================
   How I can help
   ========================================================================== */
.help {
  padding: 96px var(--gutter);
}
.help__inner {
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.section-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 640px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
.card {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  gap: 96px;
  padding: 16px;
  border-radius: 16px;
  background: var(--card);
}
.card--narrow {
  grid-column: span 1;
}
.card__index {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.03em;
  color: var(--accent);
}
.card__text {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 512px;
}
.card__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.2;
  color: var(--white);
  text-transform: uppercase;
}
.card__body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text-muted);
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 120px var(--gutter) 0;
}
.contact__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.contact__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 103px;
}
.contact__label {
  font-family: var(--font-display);
  font-size: 86px;
  line-height: 1.2;
  color: var(--white);
  text-transform: uppercase;
  text-decoration-thickness: 3px;
  text-underline-offset: 8px;
  transition: color 0.2s ease;
}
.contact__arrow {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  overflow: visible;
}
.contact__link:hover .contact__label,
.contact__link:focus-visible .contact__label {
  color: var(--accent);
  text-decoration-line: underline;
}
.contact__link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* ==========================================================================
   Footer — oversized name, gradient fill, clipped at the bottom
   ========================================================================== */
.footer {
  position: relative;
  height: 493px;
  overflow: clip;
}
.footer__name {
  position: absolute;
  right: 0;
  bottom: -52.5px;
  left: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 19.373vw;
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: nowrap;
  text-transform: uppercase;
  color: transparent;
  background-image: linear-gradient(0deg, var(--bg) 25%, #3d3d3d 72%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-stroke: 1px #000;
  user-select: none;
}

/* ==========================================================================
   Small desktop: 1200 – 1439px
   ========================================================================== */
@media (max-width: 1439.98px) {
  .hero__name--first {
    width: 100vw;
    font-size: 28.36vw;
  }
  .hero__name--last {
    bottom: -110px;
    left: 0;
    width: 100vw;
    font-size: 31.707vw;
  }
  .hero__face {
    top: -32px;
  }
  .hero__portrait {
    top: 172px;
    right: 17.3%;
    left: 17.3%;
  }
  .hero__gradient {
    height: 399px;
  }
  .hero__headline {
    right: 64px;
    left: 64px;
  }

  .about {
    padding-top: 240px;
  }
  .about__inner {
    gap: 220px;
  }

  .project__blurb {
    flex-basis: 260px;
  }

  .help {
    padding-right: 48px;
    padding-left: 48px;
  }
}

/* ==========================================================================
   Tablet: 810 – 1199px
   ========================================================================== */
@media (max-width: 1199.98px) {
  .section-title {
    font-size: 104px;
  }

  .hero__name--first {
    top: 20px;
  }
  .hero__name--last {
    bottom: -20px;
    font-size: 36.838vw;
    letter-spacing: 0.25em;
  }
  .hero__face {
    top: 220px;
    bottom: -90px;
  }
  /* Sized from the bottom at 66% of the viewport height, so the portrait
     doesn't shrink to a sliver on short (landscape) tablet screens */
  .hero__portrait {
    top: auto;
    right: 9.1%;
    bottom: 256px;
    left: 9.1%;
    height: 66vh;
  }
  .hero__gradient {
    height: 325px;
  }
  .hero__headline {
    top: 250px;
    right: 5%;
    left: 5%;
    transform: none;
  }

  .about {
    padding-top: 93px;
  }
  .about__inner {
    gap: 160px;
  }
  .clients__ticker {
    height: 147px;
  }
  .about__text {
    font-size: 26px;
  }

  .project {
    gap: 24px;
  }
  .project__blurb {
    flex-basis: 263px;
  }
  .project__body {
    line-height: 1.2;
  }

  .media-row--stack-tablet {
    flex-direction: column;
  }
  .media-row--stack-tablet > .media {
    flex: none;
    aspect-ratio: var(--ar-stacked, var(--ar));
    height: var(--h-stacked, auto);
  }

  .card,
  .card--narrow {
    grid-column: span 2;
  }
  .card__body {
    line-height: 1.2;
  }

  .footer {
    height: 392px;
  }
  .footer__name {
    bottom: -33px;
  }
}

/* ==========================================================================
   Phone: < 810px
   ========================================================================== */
@media (max-width: 809.98px) {
  :root {
    --gutter: 24px;
  }

  .section-title {
    font-size: 64px;
  }

  .hero {
    height: 95vh;
    min-height: 720px;
  }
  .hero__name--last {
    bottom: 88px;
    font-size: 39.763vw;
    letter-spacing: 0.2em;
  }
  .hero__face {
    top: 147px;
    bottom: 6px;
  }
  .hero__portrait {
    top: 0;
    right: 10%;
    bottom: auto;
    left: 10%;
    height: 487px;
  }
  .hero__portrait img {
    object-fit: cover;
  }
  .hero__gradient {
    top: 499.5px;
    bottom: auto;
    height: 130px;
  }
  .js .hero__portrait {
    transform: translateY(50px);
  }
  .hero__headline {
    top: 130px;
    right: 20px;
    left: 20px;
    flex-direction: column;
    justify-content: flex-start;
    text-align: center;
  }

  .about {
    padding-top: 40px;
  }
  .about__inner {
    gap: 100px;
  }
  .clients__ticker {
    height: 138px;
  }
  .about__text {
    font-size: 20px;
  }

  .project {
    flex-direction: column;
    align-items: stretch;
  }
  .project__blurb {
    position: relative;
    top: auto;
    flex-basis: auto;
  }

  .media-row--stack-mobile {
    flex-direction: column;
  }
  .media-row--stack-mobile > .media {
    flex: none;
    aspect-ratio: var(--ar-stacked, var(--ar));
  }
  .media--fixed-mobile {
    height: var(--h-mobile, var(--h));
  }

  .help {
    padding-right: var(--gutter);
    padding-left: var(--gutter);
  }
  .cards {
    grid-template-columns: minmax(0, 1fr);
  }
  .card,
  .card--narrow {
    grid-column: auto;
    gap: 48px;
  }
  .card__title {
    font-size: 36px;
  }

  .footer {
    height: 200px;
  }
  .footer__name {
    bottom: 0;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .ticker__track {
    animation: none;
  }
  .js .hero__portrait,
  .js .hero__headline .word {
    opacity: 1;
    filter: none;
    transform: none;
    transition: none;
  }
  .hero__face {
    transform: none !important;
  }
}
