@font-face {
  font-family: "Anormal Sans";
  src: url("fonts/AnormalSans-Medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f7f7f4;
  --ink: #1d1d1b;
  --link: #4f504b;
  --muted: #777873;
  --line: #dcdcd5;
  --accent: #a7b6a0;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -5px;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  width: 100%;
  height: 100svh;
  min-height: 0;
  max-height: 100svh;
  overflow: hidden;
}

.grid-lines {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  color: var(--line);
  pointer-events: none;
}

.grid-lines path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.cell {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: clamp(28px, 4vh, 48px) clamp(28px, 3vw, 44px);
}

.projects-cell {
  grid-column: 1;
  grid-row: 1;
}

.case-studies-cell {
  grid-column: 2;
  grid-row: 1;
  gap: calc(clamp(18px, 3.2vh, 32px) + 8px);
}

.project-list {
  --project-row-padding: 7px;

  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(18px, 3.2vh, 32px);
}

.project-row:hover span:first-child {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.project-items {
  width: 100%;
}

.project-list > .project-items {
  display: flex;
  min-height: 0;
  flex-direction: column;
  justify-content: space-between;
}

.project-stack {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  min-height: 0;
}

.project-stack > .project-items {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2vh, 20px);
}

.bottom-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  margin-top: auto;
}

.project-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: var(--project-row-padding) 0;
  color: var(--link);
  font-size: clamp(13px, 1.2vw, 14px);
  line-height: 1.3;
  transition: color 180ms ease;
}

.project-row span:last-child,
.pitch-link span {
  color: var(--accent);
  font-size: 1.1rem;
  line-height: 1;
  transition: transform 180ms ease;
}

.project-row:hover span:last-child,
.pitch-link:hover span {
  transform: translate(3px, -3px);
}

.cell-title {
  margin: 0;
  font-family: "Anormal Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(0.9rem, 1.4vw, 1.2rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.statement {
  position: relative;
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: clamp(14px, 2.2vh, 18px);
  overflow: visible;
}

.statement h1,
.hero-copy {
  position: relative;
  z-index: 4;
}

h1 {
  max-width: 650px;
  margin: 0;
  font-family: "Anormal Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(3rem, min(5.3vw, 9.5svh), 7.5rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1;
}

.hero-body {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  letter-spacing: -0.03em;
}

.hero-copy {
  display: grid;
  max-width: 520px;
  gap: 8px;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  padding-top: 4px;
  color: var(--link);
  font-size: clamp(13px, 0.95vw, 14px);
  line-height: 1.4;
}

.profile-links a,
.copy-email {
  transition: color 180ms ease;
}

.copy-email {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.copy-icon {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.25;
}

.profile-links a:hover,
.copy-email:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.copy-email:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.mustafa-reveal {
  position: relative;
  display: inline-block;
}

.photo-arc {
  --arc-shift-x: -18%;
  --photo-card-height: 52.5%;
  --photo-gap: clamp(20px, 1.25vw, 24px);
  --photo-second-column: calc(var(--photo-size) + var(--photo-gap));
  --photo-second-row: 34%;
  --photo-size: 30%;

  position: absolute;
  z-index: 6;
  bottom: calc(100% - 4px);
  left: 74%;
  width: clamp(360px, 36vw, 480px);
  height: auto;
  aspect-ratio: 7 / 5;
  pointer-events: none;
  transform: translateX(var(--arc-shift-x));
}

.photo-trigger {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.1em;
  cursor: pointer;
  transition: color 180ms ease;
}

.photo-trigger:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.mustafa-reveal:hover .photo-trigger,
.mustafa-reveal:focus-within .photo-trigger {
  animation: mustafa-color-shift 2.4s ease-in-out infinite alternate;
}

@keyframes mustafa-color-shift {
  0% {
    color: var(--ink);
  }

  34% {
    color: #e76732;
  }

  67% {
    color: #7767c7;
  }

  100% {
    color: #4d9273;
  }
}

.gallery-photo {
  --photo-delay: 0ms;
  --photo-origin: center center;
  --photo-rotation: 0deg;
  --photo-shift-x: -64px;
  --photo-shift-y: 0;

  position: absolute;
  display: block;
  width: var(--photo-size);
  aspect-ratio: 4 / 5;
  border: 3px solid var(--paper);
  border-radius: 6px;
  object-fit: cover;
  opacity: 0;
  box-shadow: 0 14px 30px rgb(29 29 27 / 16%);
  transform: translate(var(--photo-shift-x), var(--photo-shift-y)) scale(0.78) rotate(var(--photo-rotation));
  transform-origin: var(--photo-origin);
  transition:
    opacity 180ms ease,
    transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mustafa-reveal:hover .gallery-photo,
.mustafa-reveal:focus-within .gallery-photo {
  opacity: 1;
  transform: translateY(0) scale(1) rotate(var(--photo-rotation));
  transition-delay: var(--photo-delay);
}

.gallery-photo-one {
  --photo-delay: 0ms;
  --photo-rotation: -12deg;

  top: 26%;
  left: 0;
}

.gallery-photo-two {
  --photo-delay: 70ms;
  --photo-rotation: 2deg;

  top: var(--photo-second-row);
  left: var(--photo-second-column);
  z-index: 2;
}

.gallery-photo-three {
  --photo-delay: 140ms;
  --photo-rotation: 12deg;

  top: calc(var(--photo-second-row) + var(--photo-card-height) + var(--photo-gap));
  left: var(--photo-second-column);
  z-index: 3;
}

.manifesto {
  position: relative;
  z-index: 4;
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: 1fr auto;
  overflow: visible;
  align-items: end;
  column-gap: 40px;
  row-gap: 14px;
}

.manifesto-model {
  position: relative;
  z-index: 4;
  align-self: end;
  grid-column: 1;
  grid-row: 1;
  overflow: hidden;
  display: block;
  width: clamp(82px, 9vw, 140px);
  height: clamp(82px, 9vw, 140px);
  margin-left: -10px;
}

.manifesto-copy {
  grid-column: 1;
  grid-row: 2;
  max-width: 520px;
}

.manifesto-title,
.manifesto-body {
  margin: 0;
  letter-spacing: -0.03em;
}

.manifesto-title {
  margin-bottom: 8px;
  font-size: clamp(1.05rem, min(1.5vw, 3.5svh), 1.4rem);
  font-weight: 500;
}

.manifesto-body {
  color: var(--muted);
}

.hero-body,
.manifesto-body {
  font-size: clamp(14px, min(1.05vw, 2.6svh), 16px);
  line-height: 1.5;
}

.pitch-link {
  display: inline-flex;
  align-items: baseline;
  color: var(--link);
  font-size: 0.82rem;
  transition: color 180ms ease;
}

.bottom-row .bottom-link {
  padding-block: var(--project-row-padding);
  line-height: 1.3;
}

.project-row:hover,
.pitch-link:hover {
  color: var(--ink);
}

.pitch-link:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.pitch-link:hover span {
  transform: translate(3px, -3px);
}

.cursor-hint {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  display: none;
  padding: 7px 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1;
  pointer-events: none;
  transform: translateY(-50%);
  white-space: nowrap;
}

.cursor-hint.is-visible {
  display: block;
}

@media (max-width: 760px) {
  html,
  body {
    height: auto;
    overflow: auto;
    overscroll-behavior: auto;
  }

  .hero-grid {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .grid-lines {
    display: none;
  }

  .cell {
    min-height: 0;
    padding: clamp(24px, 6vw, 32px) clamp(20px, 5vw, 28px);
    overflow: visible;
    border-bottom: 1px solid var(--line);
  }

  .cell.statement {
    overflow: visible;
  }

  .cell:last-child {
    border-bottom: 0;
  }

  .projects-cell,
  .case-studies-cell,
  .statement {
    border-right: 0;
  }

  .photo-arc {
    --arc-shift-x: 0;
    --photo-gap: clamp(12px, 3vw, 16px);
    --photo-size: 28%;

    bottom: calc(100% + 8px);
    right: -8px;
    left: auto;
    width: min(86vw, 360px);
    height: auto;
  }

  .gallery-photo-one {
    top: 20%;
    left: 0;
  }

  .gallery-photo-two {
    top: 28%;
    left: calc(var(--photo-size) + var(--photo-gap));
  }

  .gallery-photo-three {
    top: 36%;
    right: 0;
    left: auto;
  }

  .project-row {
    padding: 5px 0;
    font-size: 0.76rem;
  }

  .project-list {
    --project-row-padding: 4px;

    gap: 18px;
    padding-bottom: 8px;
  }

  .project-list > .project-items {
    gap: 10px;
  }

  .project-stack {
    gap: 24px;
  }

  .statement {
    justify-content: flex-start;
    padding-top: clamp(220px, 58vw, 270px);
  }

  .manifesto {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 14px;
  }

  .manifesto-model {
    align-self: flex-start;
    width: 76px;
    height: 76px;
    margin-left: -6px;
    margin-bottom: 0;
  }

  .manifesto-copy {
    max-width: 100%;
  }

  h1 {
    margin-top: 0;
    font-size: clamp(2.75rem, 10.5vw, 4.75rem);
  }

}

@media (min-width: 761px) {
  .cell.statement {
    padding-right: clamp(28px, 3vw, 44px);
  }
}

@media (min-width: 761px) and (max-height: 900px) {
  .cell {
    padding: clamp(12px, 3vh, 24px) clamp(24px, 3vw, 44px);
  }

  .project-list {
    --project-row-padding: 1px;

    gap: clamp(10px, 2vh, 18px);
  }

  .cell-title {
    font-size: clamp(1.1rem, min(2.3vw, 4.2vh), 2rem);
  }

  .project-row {
    font-size: clamp(12px, min(1.2vw, 2.6vh), 14px);
    line-height: 1.2;
  }

  .pitch-link {
    font-size: 0.75rem;
  }
}

@media (min-width: 761px) and (max-height: 700px) {
  html,
  body {
    height: auto;
    overflow: auto;
    overscroll-behavior: auto;
  }

  .hero-grid {
    height: auto;
    max-height: none;
    grid-template-rows: 50svh minmax(360px, 1fr);
    overflow: visible;
  }

  .hero-grid::before,
  .hero-grid::after {
    position: absolute;
  }

  .statement {
    gap: 18px;
  }
}

@media (min-width: 1600px) {
  .manifesto {
    column-gap: 24px;
  }

  h1 {
    font-size: clamp(3rem, min(6.5vw, 10svh), 10rem);
  }

  .cell-title {
    font-size: clamp(1.35rem, min(2.4vw, 5svh), 2.8rem);
  }

  .project-row {
    font-size: clamp(0.76rem, min(1.2vw, 2.5svh), 1.2rem);
  }

  .hero-body,
  .manifesto-body {
    font-size: clamp(0.875rem, min(1.2vw, 3svh), 1.15rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }

  .mustafa-reveal:hover .photo-trigger,
  .mustafa-reveal:focus-within .photo-trigger {
    animation: none;
    color: #e76732;
  }
}
