:root {
  color-scheme: light;
  --ink: #2a2a2a;
  --muted: rgb(42 42 42 / 60%);
  --surface: #ffffff;
  --nav-active: #f0f0f0;
  --page-bg: #f2f2f2;
  --accent: #25c287;
  --content-width: 800px;
  --sidebar-width: 280px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--page-bg);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(180deg, rgb(71 88 92 / 20%) 0%, rgb(200 213 187 / 20%) 74.479%),
    linear-gradient(90deg, rgb(242 242 242) 0%, rgb(242 242 242) 100%);
  pointer-events: none;
}

body.has-lightbox {
  overflow: hidden;
}

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

button {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  height: 100vh;
  padding: 40px;
  background: transparent;
  overflow: visible;
}

.brand {
  display: block;
  width: max-content;
}

.brand img {
  display: block;
  width: 170px;
  height: 42px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin: auto 0;
}

.nav__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 43px;
  padding: 12px 16px;
  border-radius: 100px;
  font-size: 16px;
  line-height: 1.2;
  transition:
    background-color 160ms ease,
    font-weight 160ms ease;
}

.nav__link:hover,
.nav__link--active {
  background: var(--nav-active);
  font-weight: 600;
}

.socials {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  font-size: 16px;
  line-height: 1.2;
  white-space: nowrap;
}

.socials a,
.socials span,
.copy-email {
  flex: 0 0 auto;
}

.copy-email {
  position: relative;
  appearance: none;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font-weight: 400;
}

.copy-email::before {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 20;
  min-width: max-content;
  padding: 8px 10px;
  border-radius: 8px;
  color: #ffffff;
  background: rgb(42 42 42 / 92%);
  box-shadow: 0 8px 24px rgb(42 42 42 / 14%);
  content: attr(data-tooltip);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px) scale(0.96);
  transform-origin: 50% 100%;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.copy-email:hover::before,
.copy-email:focus-visible::before,
.copy-email.is-copied::before {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.content {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto 0 calc(var(--sidebar-width) + (100vw - var(--sidebar-width) - var(--content-width)) / 2);
  padding: 60px 0 90px;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 0 0 48px;
}

.section > p,
.intro__copy > p,
.text-panel p,
.project-card p {
  margin: 0;
  font-weight: 300;
}

.intro {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.portrait {
  position: relative;
  width: 240px;
  height: 320px;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(180deg, rgb(71 88 92 / 50%) 0%, rgb(200 213 187 / 50%) 74.48%);
}

.portrait::after {
  position: absolute;
  inset: 0;
  content: "";
  border-radius: inherit;
  background: linear-gradient(180deg, rgb(71 88 92 / 22%) 0%, rgb(200 213 187 / 22%) 74.48%);
  pointer-events: none;
}

.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom center;
}

.intro__copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.intro__header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 38px;
  font-weight: 500;
  line-height: 1.15;
}

.intro__header p {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

h2 {
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
}

.project-grid,
.lead-grid,
.side-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.project-card,
.lead-card,
.side-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 24px 32px;
  border-radius: 16px;
  background: var(--surface);
}

.project-card {
  min-height: 260px;
  transition:
    background-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.project-card--interactive {
  cursor: pointer;
}

.project-card--interactive:hover,
.project-card--interactive:focus-visible {
  background: rgb(250 250 250 / 94%);
  box-shadow: 0 10px 28px rgb(42 42 42 / 8%);
  transform: translateY(-1px);
  outline: none;
}

.project-card--interactive h3 {
  transition: color 180ms ease;
}

.project-card--interactive:hover h3,
.project-card--interactive:focus-visible h3 {
  color: var(--accent);
}

.project-card__icon {
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
  object-position: center;
}

.project-card h3,
.lead-card h3 {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
}

.project-card span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.project-card a {
  position: relative;
  z-index: 2;
  color: var(--accent);
  font-weight: 500;
}

.link-gradient {
  color: transparent;
  background: linear-gradient(90deg, #06ae76, #2aa0ff, #a854f7, #ff6b58);
  background-clip: text;
  -webkit-background-clip: text;
}

.lead-card {
  min-height: 116px;
}

.side-card {
  min-height: 176px;
}

.side-card__logo {
  display: block;
  width: auto;
  max-width: 100%;
  height: 40px;
  object-fit: contain;
  object-position: left center;
}

.side-card__logo--apricot {
  width: 192px;
  height: 64px;
}

.side-card__logo--remney {
  height: 36px;
}

.side-card__logo--hubert {
  height: 28px;
}

.side-card__logo--pizza {
  height: 48px;
}

.side-card__logo--bodypit {
  height: 42px;
}

.side-card__logos {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 60px;
}

.side-card__logos img:first-child {
  width: 94.107px;
  height: 60px;
  object-fit: contain;
}

.side-card__logos img:last-child {
  width: 102.114px;
  height: 60px;
  object-fit: contain;
}

.side-card p {
  min-height: 64px;
}

.side-card a {
  color: #006fff;
  font-weight: 500;
}

.compact-section {
  margin-bottom: 0;
}

.project-page {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.project-hero {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.back-link {
  color: #67824c;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
}

.project-title {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-title p {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.project-copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-copy p {
  margin: 0;
  font-weight: 300;
}

.project-image {
  width: 100%;
  margin: 0;
  overflow: hidden;
  border-radius: 24px;
  cursor: zoom-in;
}

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

.project-image--hero {
  height: 601px;
}

.project-image--wide {
  aspect-ratio: 1234 / 743;
}

.project-image--process {
  height: 474px;
}

.project-image--bordered {
  border: 1px solid rgb(0 0 0 / 10%);
  border-radius: 16px;
}

.project-image--contain img {
  object-fit: contain;
}

.project-image--exchange-intro {
  height: 274px;
}

.project-image--exchange-trading {
  height: 469px;
}

.project-image--exchange-onboarding {
  height: 430px;
}

.project-image--exchange-admin {
  height: 578px;
}

.project-image--aggregator-main {
  height: 454px;
}

.project-image--aggregator-nav {
  height: 540px;
}

.project-image--aggregator-stats {
  height: 439px;
}

.project-image--humanometr-main {
  height: 497px;
}

.project-image--humanometr-task {
  height: 412px;
}

.project-image--humanometr-process {
  height: 430px;
}

.project-image--cycling-main {
  height: 462px;
}

.project-image--cycling-process {
  height: 592px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 32px;
  background: rgb(0 0 0 / 72%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox__image {
  display: block;
  max-width: min(96vw, 1400px);
  max-height: 90vh;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgb(0 0 0 / 35%);
}

.lightbox__close {
  position: fixed;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgb(255 255 255 / 14%);
  cursor: pointer;
  font-size: 32px;
  line-height: 1;
}

@media (max-width: 1120px) {
  :root {
    --sidebar-width: 244px;
    --content-width: 720px;
  }

  .sidebar {
    padding: 32px 24px;
  }

  .content {
    max-width: var(--content-width);
    margin-left: calc(var(--sidebar-width) + 24px);
    margin-right: 24px;
    padding: 48px 24px 72px;
  }

  .intro {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .portrait {
    width: 220px;
    height: 293px;
  }
}

@media (max-width: 860px) {
  .site-shell {
    display: block;
  }

  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    min-height: auto;
    gap: 24px;
    padding: 24px;
  }

  .brand {
    font-size: 40px;
  }

  .nav {
    margin: 0;
    padding-bottom: 0;
  }

  .content {
    height: auto;
    margin: 0 auto;
    padding-top: 32px;
  }

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

  .portrait {
    width: min(100%, 240px);
    height: auto;
    aspect-ratio: 3 / 4;
  }

  .intro__header p {
    white-space: normal;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .content {
    padding-inline: 16px;
  }

  .project-grid,
  .lead-grid,
  .side-grid {
    grid-template-columns: 1fr;
  }

  .project-card,
  .lead-card,
  .side-card {
    padding: 22px 24px;
  }

  .project-image--hero,
  .project-image--process,
  .project-image--exchange-intro,
  .project-image--exchange-trading,
  .project-image--exchange-onboarding,
  .project-image--exchange-admin,
  .project-image--aggregator-main,
  .project-image--aggregator-nav,
  .project-image--aggregator-stats,
  .project-image--humanometr-main,
  .project-image--humanometr-task,
  .project-image--humanometr-process,
  .project-image--cycling-main,
  .project-image--cycling-process {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  h1 {
    font-size: 32px;
  }
}
