/* =========================
   ELSHADAI TEGEGN — PORTFOLIO
   Editorial / cinematic design
   ========================= */

:root {
  --ink: #0b0b0b;
  --paper: #f1eee8;
  --paper-2: #e8e2d8;
  --accent: #a8ff3e;
  --muted: rgba(11, 11, 11, 0.62);
  --line: rgba(11, 11, 11, 0.16);
  --white: #fff;
  --serif: "Italiana", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
  --pad: clamp(1.25rem, 4vw, 4.75rem);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
  cursor: none;
}

body.menu-open {
  overflow: hidden;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

button {
  font: inherit;
}

::selection {
  background: var(--accent);
  color: var(--ink);
}

/* grain */
.noise {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* intro shutter */
.intro {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
}

.intro__panel {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50.5%;
  background: var(--ink);
}

.intro__panel--top {
  top: 0;
  transform-origin: top;
}
.intro__panel--bottom {
  bottom: 0;
  transform-origin: bottom;
}

.intro__wordmark {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  color: white;
  font-family: var(--serif);
  font-size: clamp(2.25rem, 8vw, 7rem);
  line-height: 0.84;
  letter-spacing: -0.02em;
  z-index: 2;
}

.intro__wordmark span {
  display: block;
}

/* cursor */
.cursor,
.cursor-follower {
  position: fixed;
  left: 0;
  top: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
}

.cursor {
  width: 7px;
  height: 7px;
  background: var(--accent);
}

.cursor-follower {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(168, 255, 62, 0.75);
  transition:
    width 0.25s ease,
    height 0.25s ease,
    background 0.25s ease;
}

.cursor-follower.is-hovering {
  width: 76px;
  height: 76px;
  background: rgba(168, 255, 62, 0.12);
}

/* scroll progress */
.scroll-progress {
  position: fixed;
  right: 0;
  top: 0;
  width: 3px;
  height: 100vh;
  z-index: 9000;
  background: rgba(255, 255, 255, 0.08);
}

.scroll-progress span {
  display: block;
  width: 100%;
  height: 0;
  background: var(--accent);
}

/* header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem var(--pad);
  mix-blend-mode: difference;
  color: white;
}

.brand {
  font-family: var(--serif);
  font-size: 1.75rem;
  line-height: 1;
}

.brand span {
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2.75rem);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
}

.nav a {
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -0.35rem;
  height: 1px;
  background: currentColor;
  transition: right 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nav a:hover::after {
  right: 0;
}

.nav__cta {
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0.72rem 1rem;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 26px;
  height: 1px;
  background: white;
  margin: 6px auto;
}

/* hero */
.hero {
  position: relative;
  min-height: 100svh;
  background: var(--ink);
  color: white;
  overflow: hidden;
}

.hero__media,
.hero__veil {
  position: absolute;
  inset: 0;
}

.hero__media img {
  object-position: 50% 28%;
  transform: scale(1.06);
}

.hero__veil {
  background:
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.58) 0%,
      rgba(0, 0, 0, 0.1) 48%,
      rgba(0, 0, 0, 0.34) 100%
    ),
    linear-gradient(0deg, rgba(0, 0, 0, 0.5), transparent 45%);
}

.hero__content {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  padding: clamp(8rem, 14vh, 10rem) var(--pad) 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.eyebrow {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  font-weight: 500;
  text-transform: uppercase;
}

.hero__title {
  margin: auto 0 1.5rem;
  font-family: var(--serif);
  font-size: clamp(5rem, 13vw, 12.75rem);
  line-height: 0.76;
  font-weight: 400;
  letter-spacing: -0.045em;
}

.hero__title .line {
  display: block;
  overflow: hidden;
}

.hero__title .line > span {
  display: block;
  will-change: transform;
}

.hero__title .line--offset {
  padding-left: clamp(2rem, 12vw, 12rem);
}

.hero__bottom {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 2rem;
}

.hero__descriptor {
  max-width: 27rem;
  margin: 0 0 0.4rem;
  font-size: clamp(1rem, 1.3vw, 1.3rem);
  font-weight: 300;
}

.circle-link {
  width: 118px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  transition:
    background 0.35s ease,
    color 0.35s ease;
}

.circle-link:hover {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
}

.circle-link__arrow {
  font-size: 1rem;
}

.hero__index {
  position: absolute;
  right: var(--pad);
  top: 50%;
  z-index: 3;
  writing-mode: vertical-rl;
  transform: translateY(-50%);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  opacity: 0.66;
}

/* marquee */
.marquee {
  background: var(--accent);
  color: var(--ink);
  overflow: hidden;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.marquee__track {
  width: max-content;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.72rem 0;
  animation: marquee 22s linear infinite;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.3vw, 2.35rem);
  white-space: nowrap;
}

.marquee__track i {
  font-style: normal;
  font-size: 0.7em;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

.section {
  padding: clamp(7rem, 11vw, 12rem) var(--pad);
}

.section-heading {
  display: grid;
  grid-template-columns: 0.8fr 2.7fr 1fr;
  gap: 2rem;
  align-items: end;
  margin-bottom: clamp(5rem, 9vw, 9rem);
}

.section-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.2rem, 7vw, 7.5rem);
  line-height: 0.88;
  font-weight: 400;
  letter-spacing: -0.035em;
}

.section-heading h2 em {
  font-style: italic;
  color: transparent;
  -webkit-text-stroke: 1px var(--ink);
}

.section-heading__aside {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--muted);
}

/* work */
.work {
  background: var(--paper);
}

.editorial-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(2rem, 5vw, 7rem) clamp(1rem, 2vw, 2rem);
  align-items: start;
}

.project {
  min-width: 0;
}

.project--wide {
  grid-column: 1 / 8;
}
.project--tall {
  grid-column: 9 / 13;
  margin-top: 10rem;
}
.project--portrait {
  grid-column: 2 / 6;
  margin-top: 3rem;
}
.project--landscape {
  grid-column: 7 / 13;
  margin-top: 13rem;
}

.project__image {
  position: relative;
  display: block;
  overflow: hidden;
  background: #d8d2ca;
}

.project--wide .project__image {
  aspect-ratio: 0.95;
}
.project--tall .project__image {
  aspect-ratio: 0.72;
}
.project--portrait .project__image {
  aspect-ratio: auto;
}
.project--landscape .project__image {
  aspect-ratio: 1.3;
}

.project__image img {
  transition: transform 1.1s cubic-bezier(0.2, 0.7, 0.1, 1);
}

.project__image:hover img {
  transform: scale(1.045);
}

.project__hover {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(241, 238, 232, 0.92);
  backdrop-filter: blur(12px);
  padding: 0.85rem 1rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transform: translateY(130%);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.project__image:hover .project__hover {
  transform: translateY(0);
}

.project__meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  margin-top: 0.8rem;
}

.project__meta h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 500;
}

.project__meta p,
.project__meta > span {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
}

/* Runway */
.runway {
  height: 430vh;
  background: var(--ink);
  color: white;
}

.runway__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 28vw 1fr;
  align-items: center;
  gap: 4vw;
  padding: 0 var(--pad);
}

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

.runway__intro h2 {
  margin: 1.2rem 0 1.5rem;
  font-family: var(--serif);
  font-size: clamp(3rem, 5.5vw, 6.5rem);
  line-height: 0.9;
  font-weight: 400;
}

.runway__intro > p:last-child {
  max-width: 18rem;
  color: rgba(255, 255, 255, 0.52);
  line-height: 1.6;
  font-size: 0.9rem;
}

.runway__track {
  display: flex;
  gap: 2.2vw;
  width: max-content;
  will-change: transform;
}

.runway-card {
  width: min(35vw, 520px);
  min-width: 340px;
}

.runway-card__image {
  aspect-ratio: 0.76;
  overflow: hidden;
  background: #181818;
}

.runway-card__image img {
  filter: saturate(0.9);
  transition: transform 0.8s ease;
}

.runway-card:hover .runway-card__image img {
  transform: scale(1.03);
}

.runway-card__copy {
  display: grid;
  grid-template-columns: 70px 1fr;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.runway-card__copy span {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.5);
}

.runway-card__copy h3 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  font-weight: 500;
}

.runway-card__copy p {
  grid-column: 2;
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.78rem;
}

.runway-card--quote {
  height: min(74vh, 680px);
  background: var(--accent);
  color: var(--ink);
  padding: clamp(2rem, 4vw, 4rem);
  display: grid;
  align-items: end;
}

.runway-card--quote .quote-mark {
  font-family: var(--serif);
  font-size: 7rem;
  line-height: 0.5;
}

.runway-card--quote p {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4vw, 4.5rem);
  line-height: 0.95;
  margin: 1rem 0 0;
}

/* digitals */
.digitals {
  background: var(--paper-2);
}

.section-heading--compact {
  grid-template-columns: 1fr 3fr;
}

.digitals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2vw, 2rem);
}

.digital-card {
  margin: 0;
}

.digital-card--lower {
  margin-top: 7rem;
}

.digital-card img {
  aspect-ratio: 0.72;
  background: #d6d0c8;
}

.digital-card figcaption {
  margin-top: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
}

/* reveal */
.image-reveal {
  position: relative;
  overflow: hidden;
}

.image-reveal::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background: var(--ink);
  transform-origin: top;
  transform: scaleY(1);
  pointer-events: none;
}

/* stats */
.stats {
  background: var(--paper);
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(3rem, 8vw, 9rem);
  align-items: center;
}

.stats__portrait {
  min-height: 72vh;
}

.stats__copy h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(4rem, 7vw, 8rem);
  line-height: 0.84;
  margin: 1.4rem 0 2.4rem;
}

.bio {
  max-width: 34rem;
  line-height: 1.8;
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 3rem;
}

.measurements {
  margin: 0 0 3rem;
  border-top: 1px solid var(--line);
}

.measurements div {
  display: grid;
  grid-template-columns: 1fr auto;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.measurements dt {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  color: var(--muted);
}

.measurements dd {
  margin: 0;
  font-size: 0.92rem;
}

.text-link {
  display: inline-flex;
  gap: 0.8rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--ink);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

/* contact */
.contact {
  position: relative;
  min-height: 100svh;
  background: var(--ink);
  color: white;
  display: grid;
  align-items: end;
  overflow: hidden;
}

.contact__bg,
.contact__overlay {
  position: absolute;
  inset: 0;
}

.contact__bg img {
  object-position: center 35%;
  transform: scale(1.05);
}

.contact__overlay {
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.86) 0%,
    rgba(0, 0, 0, 0.36) 58%,
    rgba(0, 0, 0, 0.2) 100%
  );
}

.contact__content {
  position: relative;
  z-index: 2;
  padding: 9rem var(--pad) 2rem;
}

.contact h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(4.4rem, 10vw, 11rem);
  line-height: 0.82;
  letter-spacing: -0.045em;
  margin: 2rem 0 3rem;
}

.contact h2 span {
  display: block;
}

.contact h2 .script-like {
  padding-left: clamp(2rem, 10vw, 10rem);
  font-style: italic;
}

.contact__actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-bottom: 7rem;
}

.pill {
  min-width: 170px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  padding: 1rem 1.25rem;
  display: inline-flex;
  justify-content: space-between;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
}

.pill--ghost {
  background: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.contact__footer {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

/* responsive */
@media (max-width: 900px) {
  body {
    cursor: auto;
  }

  .cursor,
  .cursor-follower {
    display: none;
  }

  /* Keep blend mode normally, disable only while menu is open */
  body.menu-open .site-header {
    mix-blend-mode: normal;
  }

  .menu-toggle {
    display: block;
    position: relative;
    z-index: 1002;
  }

  .menu-toggle span {
    transition: transform 0.35s ease;
  }

  body.menu-open .menu-toggle span:first-child {
    transform: translateY(3.5px) rotate(45deg);
  }

  body.menu-open .menu-toggle span:last-child {
    transform: translateY(-3.5px) rotate(-45deg);
  }

  .brand {
    position: relative;
    z-index: 1002;
  }

  .nav {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;

    background: var(--ink);
    color: white;

    z-index: 1001;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;

    padding: 0 var(--pad);
    gap: 1.2rem;

    font-family: var(--serif);
    font-size: clamp(2.5rem, 9vw, 5rem);
    letter-spacing: -0.02em;
    text-transform: none;

    transform: translateY(-100%);
    transition: transform 0.65s cubic-bezier(0.76, 0, 0.24, 1);
  }

  body.menu-open .nav {
    transform: translateY(0);
  }

  .hero__index {
    display: none;
  }

  .section-heading,
  .section-heading--compact {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .section-heading__aside {
    max-width: 26rem;
  }

  .editorial-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem 1rem;
  }

  .project--wide,
  .project--tall,
  .project--portrait,
  .project--landscape {
    grid-column: auto;
    margin-top: 0;
  }

  .project--wide {
    grid-column: 1 / -1;
  }

  .project--landscape {
    grid-column: 1 / -1;
  }

  .runway__sticky {
    grid-template-columns: 1fr;
    align-content: center;
  }

  .runway__intro {
    position: absolute;
    left: var(--pad);
    top: 12vh;
  }

  .runway__intro > p:last-child {
    display: none;
  }

  .runway__track {
    padding-top: 14rem;
  }

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

  .stats__portrait {
    min-height: 65vh;
  }
}

@media (max-width: 600px) {
  :root {
    --pad: 1.05rem;
  }

  .hero__content {
    padding-top: 7rem;
  }

  .hero__title {
    font-size: clamp(4.2rem, 23vw, 7rem);
  }

  .hero__title .line--offset {
    padding-left: 1.2rem;
  }

  .circle-link {
    width: 92px;
  }

  .hero__descriptor {
    max-width: 13rem;
    font-size: 0.85rem;
  }

  .section {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }

  .section-heading {
    margin-bottom: 4rem;
  }

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

  .project--wide,
  .project--tall,
  .project--portrait,
  .project--landscape {
    grid-column: 1;
  }

  .project__image,
  .project--wide .project__image,
  .project--tall .project__image,
  .project--portrait .project__image,
  .project--landscape .project__image {
    aspect-ratio: 0.82;
  }

  .runway {
    height: 370vh;
  }

  .runway__sticky {
    padding-right: 0;
  }

  .runway-card {
    min-width: 76vw;
  }

  .digitals-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .digital-card--lower {
    margin-top: 0;
  }

  .digital-card img {
    aspect-ratio: 0.78;
  }

  .contact h2 {
    font-size: clamp(3.7rem, 18vw, 7rem);
  }

  .contact h2 .script-like {
    padding-left: 0.75rem;
  }

  .contact__footer {
    flex-direction: column;
    gap: 0.4rem;
  }
}

/* accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .intro {
    display: none;
  }
  .image-reveal::after {
    display: none;
  }
}

.footer-dev-link {
  position: relative;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.3s ease;
}

.footer-dev-link:hover {
  color: var(--accent);
}

.footer-dev-link::after {
  content: " SWE";
  position: absolute;
  left: 50%;
  top: -22px;

  transform: translate(-50%, 8px);

  padding: 0.3rem 0.45rem;

  background: var(--accent);
  color: var(--ink);

  font-size: 0.55rem;
  letter-spacing: 0.12em;

  opacity: 0;
  pointer-events: none;

  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.footer-dev-link:hover::after {
  opacity: 1;
  transform: translate(-50%, 0);
}
