/* CreativeDiv: Ali Hussain, web developer. Bold editorial, light. */

:root {
  --bg: #ffffff;
  --soft: #f4f4f2;
  --ink: #0a0a0b;
  --text: #2b2b2f;
  --muted: #6b6b73;
  --line: #e6e6e3;
  --accent: #2f5bff;
  /* the logo: purple, violet, blue, cyan */
  --grad: linear-gradient(90deg, #7830fd 0%, #5f3bfb 30%, #1d6dfd 62%, #10c2fb 100%);
  --live: #16a34a;

  --display: 'Inter Tight', 'Inter', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --pad: clamp(1rem, 4vw, 3rem);
  --max: 90rem;
  --section: clamp(5rem, 11vw, 10rem);
  --radius: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 1.0625rem; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, p, figure, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:target { scroll-margin-top: 5rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--ink); color: #fff; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }

/* scroll progress */
.progress { position: fixed; z-index: 50; top: 0; left: 0; height: 3px; width: 100%; background: var(--grad); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em; min-height: 3.25rem; padding: 0 1.6rem;
  border-radius: 999px; font: 600 1rem var(--body); text-decoration: none; white-space: nowrap;
  transition: transform 220ms var(--ease), background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}
.btn span { transition: transform 220ms var(--ease); }
.btn:hover span { transform: translate(2px, 1px); }
.btn:active { transform: scale(0.97); }
.btn--dark { background: var(--ink); color: #fff; border: 1.5px solid var(--ink); }
.btn--dark:hover { background: var(--accent); border-color: var(--accent); }
.btn--line { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn--line:hover { background: var(--ink); color: #fff; }
.btn--sm { min-height: 2.6rem; padding: 0 1.15rem; font-size: 0.9375rem; }

/* nav */
.nav { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, 0.9); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); transition: box-shadow 200ms ease; }
.nav.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; }
.nav__brand { display: inline-flex; align-items: center; gap: 0.6rem; font: 800 1.1875rem var(--display); letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.nav__brand img { width: auto; height: 1.75rem; transition: transform 400ms var(--ease); }
.nav__brand:hover img { transform: rotate(-8deg) scale(1.06); }
.nav__links { display: flex; gap: 2.25rem; }
.nav__links a { position: relative; font-weight: 500; font-size: 0.9375rem; color: var(--text); text-decoration: none; }
.nav__links a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 260ms var(--ease); }
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__end { display: flex; align-items: center; gap: 0.75rem; }
.nav__toggle { display: none; }

/* hero */
.hero { position: relative; isolation: isolate; padding-top: clamp(3.5rem, 9vw, 8rem); padding-bottom: clamp(3rem, 6vw, 5rem); }
/* background: a still dot grid fading out at the edges. Clipped, so nothing scrolls sideways. */
.hero__bg {
  position: absolute; z-index: -1; top: -4.5rem; bottom: 0; left: calc(50% - 50vw); width: 100vw;
  overflow: hidden; pointer-events: none;
  background-image: radial-gradient(circle, rgba(10, 10, 11, 0.16) 1.2px, transparent 1.6px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 40%, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse 70% 65% at 50% 40%, #000 30%, transparent 80%);
}
.status { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.45rem 1rem 0.45rem 0.8rem; border-radius: 999px; background: var(--soft); font-size: 0.9375rem; font-weight: 500; color: var(--text); }
.status__dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--live); }
.status__dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--live); animation: ping 1.8s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: 0.6; } 100% { transform: scale(2.8); opacity: 0; } }

.hero__title {
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  font: 900 clamp(2.25rem, 10.1vw, 11.5rem)/0.9 var(--display); letter-spacing: -0.045em; text-transform: uppercase; color: var(--ink);
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.04em; }
.hero__title .line > span { display: inline-block; }
.hero__title .line:last-child > span { white-space: nowrap; } /* "that" and the rotating word always share a line */
.hero__title em { font-style: normal; color: var(--accent); }
/* rotating word: every word sits in the same grid cell, so the line never jumps */
.rotator { display: inline-grid; vertical-align: top; overflow: hidden; clip-path: inset(0); /* gradient text ignores overflow while it animates in Chrome; clip-path still clips it */ padding-bottom: 0.06em; margin-bottom: -0.06em; }
.rotator b { grid-area: 1 / 1; font-weight: inherit; background-image: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; transform: translateY(105%); opacity: 0; transition: transform 700ms var(--ease), opacity 400ms ease; }
.rotator b.is-on { transform: none; opacity: 1; }
.rotator b.is-out { transform: translateY(-105%); opacity: 0; }
@media (prefers-reduced-motion: reduce) { .rotator b { transition: none; } }

.hero__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 2rem 4rem; margin-top: clamp(2rem, 4vw, 3.5rem); }
.hero__lead { max-width: 34em; font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem); line-height: 1.5; color: var(--text); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-top: clamp(3.5rem, 7vw, 6rem); }
.stat { padding: 1.5rem 1.5rem 1.6rem; border-radius: var(--radius); background: var(--soft); }
.stat dt { font: 800 clamp(2.5rem, 1.6rem + 2.6vw, 4.25rem)/1 var(--display); letter-spacing: -0.04em; color: var(--ink); width: fit-content; background-image: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-variant-numeric: tabular-nums; }
.stat dd { margin-top: 0.6rem; color: var(--muted); font-size: 0.9375rem; line-height: 1.4; }

/* marquee */
.marquee { overflow: hidden; padding: 1.4rem 0; background: var(--ink); color: #fff; }
.marquee__track { display: flex; width: max-content; animation: slide 38s linear infinite; }
.marquee__track span { display: inline-flex; align-items: center; font: 600 clamp(1.25rem, 1rem + 1vw, 1.875rem) var(--display); letter-spacing: -0.02em; padding-inline: 1.6rem; white-space: nowrap; }
.marquee__track span::after { content: ''; width: 8px; height: 8px; margin-left: 3.2rem; border-radius: 50%; background: var(--grad); }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }

/* section heads */
.head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 3rem; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.h2 em, .process__title em { font-style: normal; background-image: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 0.04em; }
.h2 { font: 900 clamp(2.75rem, 1.2rem + 5.4vw, 6.5rem)/0.92 var(--display); letter-spacing: -0.045em; text-transform: uppercase; color: var(--ink); }
.head__note { max-width: 24em; color: var(--muted); font-size: 1.0625rem; }

/* work grid */
.work { padding-top: var(--section); padding-bottom: var(--section); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 2.5vw, 2rem); }
.project { display: flex; flex-direction: column; }
.project__shot { display: block; overflow: hidden; border-radius: var(--radius); background: var(--soft); }
.project__shot img { width: 100%; aspect-ratio: 1440 / 780; object-fit: cover; object-position: top; transition: transform 900ms var(--ease); }
.project:hover .project__shot img { transform: scale(1.05); }
.project__info { padding-top: 1.25rem; }
.project__info h3 { font: 800 clamp(1.5rem, 1.15rem + 0.9vw, 2rem)/1.05 var(--display); letter-spacing: -0.03em; color: var(--ink); }
.project__info h3 a { color: inherit; text-decoration: none; transition: color 200ms ease; }
.project__info h3 a span { display: inline-block; font-weight: 600; transition: transform 250ms var(--ease); }
.project:hover h3 a { color: var(--accent); }
.project:hover h3 a span { transform: translate(3px, -3px); }
.project__info p { margin-top: 0.7rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 1rem; }
.tags li { padding: 0.3rem 0.8rem; border-radius: 999px; background: var(--soft); font-size: 0.875rem; font-weight: 500; color: var(--text); }
.project--private { grid-column: span 1; justify-content: center; padding: clamp(1.75rem, 4vw, 3.5rem); border-radius: var(--radius); background: var(--ink); color: #d4d4d8; }
.project--private .project__info { padding-top: 0; }
.project--private h3 { color: #fff; }
.project__link { display: inline-flex; gap: 0.4em; margin-top: 1.5rem; font-weight: 600; color: #fff; text-decoration: none; border-bottom: 1.5px solid #fff; padding-bottom: 2px; transition: color 200ms ease, border-color 200ms ease; }
.project__link:hover { color: #9db0ff; border-color: #9db0ff; }

.project--private .project__info { max-width: 36rem; }
.project--private .project__info p { margin-top: 0.9rem; }
.project--private .project__link { margin-top: 1.5rem; white-space: nowrap; }

/* agency work */
.agency { padding-bottom: var(--section); }
.grid--agency { row-gap: clamp(2rem, 3.5vw, 3rem); }
.shot-card { display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: zoom-in; }
.shot-card img { width: 100%; aspect-ratio: 1440 / 780; object-fit: cover; object-position: top; border-radius: var(--radius); background: var(--soft); margin-bottom: 0.85rem; transition: transform 700ms var(--ease), box-shadow 400ms ease; }
.shot-card:hover img { transform: translateY(-4px); box-shadow: 0 22px 44px -26px rgba(10, 10, 11, 0.45); }
.shot-card__title { font: 800 1.375rem/1.1 var(--display); letter-spacing: -0.025em; color: var(--ink); transition: color 200ms ease; }
.shot-card:hover .shot-card__title { color: var(--accent); }
.shot-card__type { color: var(--muted); font-size: 0.9375rem; }

/* services and process */
.services { padding: var(--section) 0; background: var(--ink); color: #c4c4cc; }
.services .h2 { color: #fff; }
.services .head__note { color: #a1a1aa; }
.services__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.service { padding: 2rem 1.75rem; border-radius: var(--radius); background: #18181b; transition: background-color 300ms ease, transform 300ms var(--ease); }
.service:hover { background: #1f1f24; transform: translateY(-4px); }
.service h3 { font: 800 1.5rem/1.1 var(--display); letter-spacing: -0.025em; color: #fff; margin-bottom: 0.8rem; }
.service:hover h3 { color: #9db0ff; }
.process__title { margin-top: clamp(4rem, 8vw, 6.5rem); font: 900 clamp(2rem, 1rem + 3vw, 3.75rem)/0.95 var(--display); letter-spacing: -0.04em; text-transform: uppercase; color: #fff; }
.process { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem 2rem; margin-top: 2.5rem; }
.process li { padding-top: 1.25rem; border-top: 2px solid #3f3f46; }
.process__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.process__head .ico { margin-bottom: 0; }
.process__num { font: 800 0.9375rem var(--display); color: #9db0ff; }
.process__step { display: block; font: 800 1.5rem/1.1 var(--display); letter-spacing: -0.02em; color: #fff; margin-bottom: 0.6rem; }

/* full-page viewer */
.viewer { width: min(56rem, calc(100vw - 2rem)); max-height: calc(100svh - 2rem); padding: 0; border: 0; border-radius: var(--radius); background: #fff; color: var(--ink); overflow: hidden; }
.viewer::backdrop { background: rgba(10, 10, 11, 0.72); backdrop-filter: blur(4px); }
.viewer[open] { display: flex; flex-direction: column; animation: viewerIn 380ms var(--ease); }
@keyframes viewerIn { from { opacity: 0; transform: translateY(24px) scale(0.98); } }
.viewer__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 1.25rem; box-shadow: 0 1px 0 var(--line); }
.viewer__bar p { font: 800 1.125rem var(--display); letter-spacing: -0.02em; }
.viewer__close { min-height: 2.5rem; padding: 0 1rem; border: 1.5px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink); font: 600 0.9375rem var(--body); cursor: pointer; transition: background-color 200ms ease, color 200ms ease; }
.viewer__close:hover { background: var(--ink); color: #fff; }
.viewer__body { overflow-y: auto; overscroll-behavior: contain; }
.viewer__body img { width: 100%; height: auto; }

/* gradient line icons */
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { display: grid; place-items: center; width: 3rem; height: 3rem; margin-bottom: 1.1rem; border-radius: 14px; background: linear-gradient(135deg, rgba(120, 48, 253, 0.1), rgba(16, 194, 251, 0.12)); transition: transform 400ms var(--ease); }
.ico svg { width: 1.5rem; height: 1.5rem; }
.service .ico, .process .ico, .skill--edu .ico { background: linear-gradient(135deg, rgba(120, 48, 253, 0.22), rgba(16, 194, 251, 0.18)); }
.skill:hover .ico, .service:hover .ico, .process li:hover .ico { transform: rotate(-8deg) scale(1.06); }

/* experience */
.exp { padding: var(--section) 0; background: var(--soft); }
.jobs { display: grid; }
.job { display: grid; grid-template-columns: 13rem minmax(0, 1fr) minmax(0, 1.3fr); gap: 1rem 3rem; padding: 2.25rem 0; border-top: 1.5px solid var(--ink); }
.job:last-child { border-bottom: 1.5px solid var(--ink); }
.job__when { font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 0.35rem; }
.job__role { font: 800 clamp(1.5rem, 1.1rem + 1.2vw, 2.25rem)/1.05 var(--display); letter-spacing: -0.03em; color: var(--ink); }
.job__org { margin-top: 0.5rem; color: var(--muted); font-size: 0.9375rem; }
.job__points { display: grid; gap: 0.5rem; padding-top: 0.3rem; }
.job__points li { position: relative; padding-left: 1.2rem; }
.job__points li::before { content: ''; position: absolute; left: 0; top: 0.7em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* skills */
.skills { padding-top: var(--section); padding-bottom: var(--section); }
.skills__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.skill { padding: 1.75rem; border-radius: var(--radius); background: var(--soft); transition: transform 300ms var(--ease), background-color 300ms ease; }
.skill:hover { transform: translateY(-4px); }
.skill h3 { font: 800 1.375rem/1.1 var(--display); letter-spacing: -0.02em; color: var(--ink); margin-bottom: 0.75rem; }
.skill--edu { grid-column: 1 / -1; background: var(--ink); color: #d4d4d8; }
.skill--edu h3, .skill--edu strong { color: #fff; }

/* contact */
.contact { padding: var(--section) 0 2.5rem; background: var(--ink); color: #d4d4d8; }
.contact__title { font: 900 clamp(2.5rem, 11.5vw, 12rem)/0.88 var(--display); letter-spacing: -0.05em; text-transform: uppercase; color: #fff; white-space: nowrap; }
.contact__title em { font-style: normal; }
/* three contact links: one line from laptop width up, stacked on smaller screens */
.contact__links { display: flex; flex-direction: column; align-items: flex-start; gap: 1.1rem; margin-top: clamp(1.5rem, 3vw, 2.5rem); }
.contact__email { display: inline-flex; align-items: center; gap: 0.3em; font: 700 clamp(1.375rem, 0.8rem + 3vw, 2.25rem)/1.1 var(--display); letter-spacing: -0.03em; color: #fff; text-decoration: none; white-space: nowrap; border-bottom: 2px solid #3f3f46; padding-bottom: 0.15em; transition: border-color 250ms ease, color 250ms ease; }
@media (min-width: 56em) {
  .contact__links { flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 2rem; }
  .contact__email { font-size: min(2.45vw, 2.5rem); }
}
.contact__icon { display: inline-grid; place-items: center; flex: none; width: 1.15em; height: 1.15em; margin-right: 0.15em; border-radius: 50%; color: #fff; transition: transform 300ms var(--ease); }
.contact__icon svg { width: 60%; height: 60%; }
.contact__email:hover .contact__icon { transform: rotate(-10deg) scale(1.08); }
.contact__icon--mail { background: var(--accent); }
.contact__icon--wa { background: #25d366; }
.contact__icon--li { background: #0a66c2; border-radius: 0.22em; }
.contact__icon--li svg { width: 56%; height: 56%; }
.contact__mail:hover { color: #9db0ff; border-color: #9db0ff; }
.contact__wa:hover { color: #4ade80; border-color: #4ade80; }
.contact__li:hover { color: #7cb7ff; border-color: #7cb7ff; }
.contact__foot { display: flex; justify-content: space-between; gap: 1rem; margin-top: clamp(4rem, 8vw, 7rem); padding-top: 1.5rem; border-top: 1px solid #27272a; font-size: 0.9375rem; color: #8b8b95; }
.contact__foot a { color: #8b8b95; text-decoration: none; }
.contact__foot a:hover { color: #fff; }

/* motion (content stays visible without JavaScript) */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__title .line > span { transform: translateY(105%); animation: lineUp 1000ms var(--ease) forwards; }
  .js .hero__title .line:nth-child(2) > span { animation-delay: 110ms; }
  .js .status, .js .hero__row, .js .stats { opacity: 0; transform: translateY(18px); animation: fadeUp 900ms var(--ease) forwards; }
  .js .status { animation-delay: 0ms; }
  .js .hero__row { animation-delay: 350ms; }
  .js .stats { animation-delay: 500ms; }
  .js .reveal, .js .project, .js .head { opacity: 0; transform: translateY(28px); transition: opacity 800ms var(--ease), transform 900ms var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
  .js .is-in { opacity: 1 !important; transform: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; flex-wrap: wrap; width: auto; }
  .status__dot::after { animation: none; }
}
@keyframes lineUp { to { transform: none; } }
@keyframes fadeUp { to { opacity: 1; transform: none; } }

/* responsive */
@media (max-width: 64em) {
  .services__grid, .process { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project--private { grid-column: 1 / -1; }

  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .job { grid-template-columns: 1fr; gap: 0.75rem; }
  .skills__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 52em) {
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; gap: 0;
    padding: 0.5rem var(--pad) 1.25rem; background: #fff; box-shadow: 0 12px 24px -16px rgba(0, 0, 0, 0.25);
  }
  .nav__links a { padding: 0.85rem 0; font-size: 1.125rem; border-bottom: 1px solid var(--line); }
  .nav__links a::after { display: none; }
  .nav.is-open .nav__links, .no-js .nav__links { display: flex; }
  .nav__toggle { display: inline-flex; align-items: center; min-height: 2.6rem; padding: 0 1.1rem; border: 1.5px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink); font: 600 0.9375rem var(--body); cursor: pointer; }
  .hero__row { grid-template-columns: 1fr; }
}
@media (max-width: 40em) {
  body { font-size: 1rem; }
  .hero__title { font-size: 11.2vw; }
  .services__grid, .process { grid-template-columns: 1fr; }
  .hero__title .line > span { display: inline; }
  .nav__end .btn { display: none; }
  .hero__actions .btn { flex: 1 1 100%; }
  .stat { padding: 1.15rem; }
  .skills__grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .contact__foot { flex-direction: column; }
}
