:root {
  color-scheme: light;
  font-family: "Heebo", Arial, sans-serif;
  font-synthesis: none;
  --ink: #111111;
  --paper: #ffffff;
  --line: rgba(17, 17, 17, 0.16);
  --sidebar-width: clamp(220px, 25vw, 480px);
  --home-grid-side-gap: clamp(18px, 2.5vw, 36px);
}

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

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

body {
  font-family: "Heebo", Arial, sans-serif;
  font-weight: 300;
  overflow: hidden;
}

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

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

/* ── Layout ── */
.home-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100svh;
}

/* ── Sidebar ── */
.home-sidebar {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(30px, 3vw, 48px) clamp(20px, 2.5vw, 36px);
  overflow-y: auto;
}

.home-sidebar__name {
  font-size: clamp(11px, 0.9vw, 14px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.home-sidebar__subtitle {
  margin: clamp(7px, 0.7vw, 11px) 0 0;
  color: rgba(17, 17, 17, 0.64);
  font-size: clamp(9px, 0.72vw, 11px);
  font-weight: 300;
  line-height: 1.35;
  letter-spacing: 0.025em;
}

.home-sidebar__nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(6px, 0.6vw, 10px);
  margin-top: auto;
  font-size: clamp(10px, 0.8vw, 12px);
  font-weight: 300;
  line-height: 1;
}

.home-sidebar__nav > a {
  letter-spacing: 0.04em;
}

.home-sidebar__section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(8px, 0.7vw, 12px);
}

.home-sidebar__heading {
  font-weight: 400;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.home-sidebar__section a {
  font-weight: 300;
  opacity: 0.7;
  transition: opacity 180ms ease;
}

.home-sidebar__section a:hover {
  opacity: 1;
}

.home-sidebar a:hover,
.home-sidebar a:focus-visible {
  outline: 0;
  opacity: 0.52;
}

/* ── Project Grid ── */
.project-grid {
  margin: 0;
  display: grid;
  width: 100%;
  max-width: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  background: #ffffff;
  padding: 24px var(--home-grid-side-gap);
  align-content: center;
}

.project-card {
  position: relative;
  display: block;
  min-width: 0;
  aspect-ratio: 1;
  overflow: hidden;
  background: #ffffff;
}

.project-card::after {
  position: absolute;
  z-index: 2;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  content: "";
  opacity: 0;
  transition: opacity 220ms ease;
}

.project-card > img,
.project-card__image,
.project-card__placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
  transition: transform 360ms ease, filter 240ms ease;
}

.project-card:nth-child(1) > img {
  filter: saturate(1.12) contrast(1.06) brightness(1.005);
}

.project-card:nth-child(2) > img {
  filter: saturate(1.04) contrast(1.05) brightness(1.01);
}

.project-card:nth-child(3) > img {
  filter: saturate(1.18) contrast(1.07) brightness(1);
}

.project-card:nth-child(4) > img {
  filter: saturate(1.15) contrast(1.06) brightness(1);
}

.project-card:nth-child(5) .project-card__image {
  filter: saturate(1.03) contrast(1.04) brightness(1.005);
}

.project-card:nth-child(6) > img {
  filter: saturate(1.18) contrast(1.06) brightness(1);
}

.project-card::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: transparent;
  content: "";
  mix-blend-mode: normal;
  pointer-events: none;
}

.project-card__image {
  display: block;
  background-repeat: no-repeat;
}

.project-card__image--model {
  background-color: #eaeae7;
  background-image: url("/assets/models/עיצוב ללא שם (2).png");
  background-position: 33.7% 49%;
  background-size: 400% 360%;
  background-blend-mode: multiply;
}

.project-card:first-child > img {
  object-position: 22% center;
}

.project-card:nth-child(2) > img {
  object-position: center;
}

.project-card:last-child > img {
  object-position: 4% center;
}

.project-card__placeholder {
  display: block;
  background: #efefed;
}

.project-card__placeholder--warm {
  background: #e7e4df;
}

.project-card__placeholder--photos {
  background: #dfe7e9;
}

.project-card__title {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(7px, 0.65vw, 11px);
  padding: 10px 12px;
  background: transparent;
  color: var(--ink);
  font-size: clamp(11px, 0.85vw, 14px);
  font-weight: 300;
  line-height: 1;
  opacity: 0;
  transition: opacity 180ms ease;
}

.project-card__title strong {
  font-size: clamp(18px, 1.5vw, 28px);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.project-card:hover::after,
.project-card:focus-visible::after,
.project-card:hover .project-card__title,
.project-card:focus-visible .project-card__title {
  opacity: 1;
}

.project-card:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}

/* ── Mobile ── */
@media (max-width: 760px) {
  body {
    overflow: auto;
  }

  .home-layout {
    display: flex;
    flex-direction: column;
  }

  .home-sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 30px 20px;
  }

  .project-grid {
    margin-left: 0;
    width: 100%;
    max-width: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 16px 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-card > img,
  .project-card__image,
  .project-card__placeholder {
    transition: none;
  }
}
