/* Portfolio — rebuilt from Figma Dimension 1200+ */
:root {
  --bg: #fafcff;
  --text-primary: #171718;
  --text-body: #2c2c2c;
  --text-muted: #a8a8ab;
  --brand: #2563eb;
  --brand-hover: #60a5fa;
  --page: 1200px;
  --gutter: 40px;
  --radius-img: 24px;
  --font: "Satoshi", "Segoe UI", sans-serif;
}

@font-face {
  font-family: "Satoshi";
  src: url("../assets/fonts/Satoshi-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("../assets/fonts/Satoshi-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("../assets/fonts/Satoshi-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("../assets/fonts/Satoshi-Black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text-body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

.page {
  width: min(100%, var(--page));
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* —— Nav —— */
.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 60px;
  padding: 0 var(--gutter);
  flex-shrink: 0;
}

.nav__logo {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s ease;
}

.nav__logo:hover {
  transform: rotate(-8deg) scale(1.05);
}

.nav__logo img {
  width: 32px;
  height: 32px;
}

.nav__links {
  display: flex;
  gap: 160px;
  align-items: center;
  justify-content: center;
}

.nav__link {
  font-weight: 900;
  font-size: 16px;
  line-height: 1;
  color: var(--text-primary);
  transition: color 0.2s ease;
}

.nav__link:hover {
  color: var(--brand-hover);
}

.nav__link.is-active {
  color: var(--brand-hover);
}

/* —— Footer —— */
.footer {
  margin-top: auto;
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 var(--gutter);
  flex-shrink: 0;
}

.footer p {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--text-muted);
}

/* —— Button —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  background: var(--brand);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
  cursor: pointer;
  box-shadow: 0 2px 0 rgba(37, 99, 235, 0.1);
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  background: var(--brand-hover);
  transform: translateY(-1px);
}

/* —— Main —— */
.main-hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px var(--gutter) 24px;
  animation: rise 0.7s ease both;
}

.main-hero img {
  width: min(600px, 100%);
  height: auto;
}

/* —— Work —— */
.work-list {
  display: flex;
  flex-direction: column;
  gap: 96px;
  padding: 96px var(--gutter) 64px;
}

.work-item {
  display: grid;
  grid-template-columns: minmax(0, 480px) minmax(0, 640px);
  gap: 0 24px;
  align-items: center;
  animation: rise 0.6s ease both;
}

.work-item:nth-child(2) { animation-delay: 0.08s; }
.work-item:nth-child(3) { animation-delay: 0.16s; }
.work-item:nth-child(4) { animation-delay: 0.24s; }

.work-item__copy {
  display: flex;
  flex-direction: column;
  gap: 48px;
  align-items: flex-start;
  padding-right: 24px;
}

.work-item__title {
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-body);
}

.work-item__media {
  border-radius: var(--radius-img);
  overflow: hidden;
  background: #eef2f7;
}

.work-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 640 / 428;
  transition: transform 0.55s ease;
}

.work-item:hover .work-item__media img {
  transform: scale(1.03);
}

/* —— About —— */
.about {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 164px var(--gutter) 64px;
  animation: rise 0.6s ease both;
}

.about__bio {
  max-width: 442px;
  justify-self: start;
  text-align: right;
}

.about__bio h1 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-body);
}

.about__bio p {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--text-body);
}

.about__contacts {
  justify-self: end;
  align-self: end;
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 150px;
}

.contact dt {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  color: var(--text-body);
}

.contact dd {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  color: var(--text-body);
}

.contact a:hover {
  color: var(--brand);
}

/* —— Case study —— */
.case {
  padding: 96px var(--gutter) 48px;
  display: flex;
  flex-direction: column;
  gap: 96px;
}

.case-hero,
.case-section {
  display: grid;
  grid-template-columns: minmax(0, 456px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  animation: rise 0.55s ease both;
}

.case-hero__info,
.case-section__info {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-right: 24px;
  padding-top: 29px;
}

.case-section__info {
  padding-top: 80px;
  gap: 48px;
}

.case-title {
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  line-height: 56px;
  color: var(--text-body);
}

.case-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.case-block h2,
.case-section__info h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: #000;
}

.case-section__info h2 {
  font-size: 28px;
  letter-spacing: -1.4px;
  color: var(--text-body);
  line-height: normal;
}

.case-block p,
.case-section__info p {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: #000;
}

.case-block ul {
  margin: 0;
  padding-left: 21px;
  font-size: 14px;
  line-height: 1.4;
  color: #000;
}

.case-block li + li {
  margin-top: 0;
}

.case-media {
  border-radius: var(--radius-img);
  overflow: hidden;
  background: #eef2f7;
}

.case-media img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.case-section__text {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  .work-item,
  .case-hero,
  .case-section,
  .about {
    grid-template-columns: 1fr;
  }

  .about {
    padding-top: 96px;
  }

  .about__bio {
    text-align: left;
    max-width: none;
  }

  .about__contacts {
    justify-self: start;
    align-self: start;
    width: auto;
  }

  .work-item__copy,
  .case-hero__info,
  .case-section__info {
    padding-right: 0;
    padding-top: 0;
  }

  .case-section__info {
    order: 1;
  }

  .case-section .case-media {
    order: 0;
  }

  .nav__links {
    gap: 28px;
  }

  .work-list,
  .case {
    gap: 64px;
    padding-top: 64px;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 20px;
  }

  .nav {
    grid-template-columns: auto 1fr;
  }

  .nav__links {
    justify-content: flex-end;
  }
}
