.tech-container {
  overflow-x: clip;
  overflow-y: visible;
}

.tech-stack {
  width: 100%;
  max-width: 1200px;
  margin: 160px auto 0;
  text-align: left;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 377px;
  gap: 0px;
  position: relative;
  border-right: 1px solid var(--color-border-line);
  border-bottom: 1px solid var(--color-border-line);
}

.tech-stack-box {
  height: 377px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  position: relative;
  border-top: 1px solid var(--color-border-line);
  border-left: 1px solid var(--color-border-line);
  width: 100%;
  overflow: visible;
}

.tech-stack > div:nth-child(1)::before {
  content: "";
  position: absolute;
  top: -20px;
  left: -20px;
  width: 20px;
  height: 20px;
  background: linear-gradient(to right, var(--color-border-line) 0 100%, transparent 0) bottom
      left / 20px 1px no-repeat,
    linear-gradient(to top, var(--color-border-line) 0 100%, transparent 0) bottom left / 1px
      20px no-repeat;
  transform: rotate(270deg);
}

.tech-stack > div:nth-child(1)::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  left: -5px;
  top: -5px;
  background: linear-gradient(to bottom, var(--color-plus) 0 100%, transparent 0) center /
      1px 9px no-repeat,
    linear-gradient(to right, var(--color-plus) 0 100%, transparent 0) center / 9px 1px
      no-repeat,
    linear-gradient(to bottom right, var(--color-plus) 0 100%, transparent 0) center / 1px
      9px no-repeat,
    linear-gradient(to bottom right, var(--color-plus) 0 100%, transparent 0) center / 1px
      9px no-repeat;
}

.tech-stack > div:nth-child(-n+3):not(:first-child)::before {
  content: "";
  position: absolute;
  top: -20px;
  left: -20px;
  width: 20px;
  height: 20px;
  background: linear-gradient(to top, var(--color-border-line) 0 100%, transparent 0) bottom
    left / 1px 20px no-repeat;
  transform: rotate(180deg);
}

.tech-stack > div:nth-child(-n+3):not(:first-child)::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  left: -5px;
  top: -5px;
  background: linear-gradient(to bottom, var(--color-plus) 0 100%, transparent 0) center /
      1px 9px no-repeat,
    linear-gradient(to right, var(--color-plus) 0 100%, transparent 0) center / 9px 1px
      no-repeat,
    linear-gradient(to bottom right, var(--color-plus) 0 100%, transparent 0) center / 1px
      9px no-repeat,
    linear-gradient(to top right, var(--color-plus) 0 100%, transparent 0) center / 1px 9px
      no-repeat;
}

.tech-stack > div:nth-child(3) > div::before {
  content: "";
  position: absolute;
  top: -20px;
  right: -20px;
  width: 20px;
  height: 20px;
  background: linear-gradient(to right, var(--color-border-line) 0 100%, transparent 0) bottom
      right / 20px 1px no-repeat,
    linear-gradient(to top, var(--color-border-line) 0 100%, transparent 0) bottom left / 1px
      20px no-repeat;
  transform: rotate(360deg);
}

.tech-stack > div:nth-child(3) > div::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  right: -5px;
  top: -5px;
  background: linear-gradient(to bottom, var(--color-plus) 0 100%, transparent 0) center /
      1px 9px no-repeat,
    linear-gradient(to right, var(--color-plus) 0 100%, transparent 0) center / 9px 1px
      no-repeat,
    linear-gradient(to bottom right, var(--color-plus) 0 100%, transparent 0) center / 1px
      9px no-repeat,
    linear-gradient(to top right, var(--color-plus) 0 100%, transparent 0) center / 1px 9px
      no-repeat;
}

.tech-stack > div:nth-child(3n+1):not(:first-child):not(:nth-last-child(3))::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -20px;
  width: 20px;
  height: 20px;
  background: linear-gradient(to top, var(--color-border-line) 0 100%, transparent 0) bottom
    left / 1px 20px no-repeat;
  transform: rotate(90deg);
}

.tech-stack > div:nth-last-child(6)::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: -20px;
  width: 20px;
  height: 20px;
  background: linear-gradient(to top, var(--color-border-line) 0 100%, transparent 0) bottom
    left / 1px 20px no-repeat;
  transform: rotate(90deg);
}

.tech-stack > div:nth-child(3n):not(:nth-child(3)):not(:nth-last-child(1))::before {
  content: "";
  position: absolute;
  top: -20px;
  right: -20px;
  width: 20px;
  height: 20px;
  background: linear-gradient(to top, var(--color-border-line) 0 100%, transparent 0) bottom
    right / 1px 20px no-repeat;
  transform: rotate(90deg);
  z-index: 10;
}

.tech-stack > div:nth-child(3n):not(:nth-child(3)):not(:nth-last-child(1))::after {
  content: "";
  position: absolute;
  bottom: -1px;
  right: -20px;
  width: 20px;
  height: 20px;
  background: linear-gradient(to top, var(--color-border-line) 0 100%, transparent 0) bottom
    right / 1px 20px no-repeat;
  transform: rotate(90deg);
  z-index: 10;
}

/* ===== BOTTOM-LEFT CORNER (last left-side cell) ===== */
.tech-stack > div:nth-last-child(3)::before {
  content: "";
  position: absolute;
  bottom: -20px;
  left: -20px;
  width: 20px;
  height: 20px;
  background:
    linear-gradient(to right, var(--color-border-line) 0 100%, transparent 0) bottom left / 20px 1px no-repeat,
    linear-gradient(to top, var(--color-border-line) 0 100%, transparent 0) bottom left / 1px 20px no-repeat;
  transform: rotate(180deg);
}
.tech-stack > div:nth-last-child(3)::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  left: -5px;
  bottom: -5px;
  background:
    linear-gradient(to bottom, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat,
    linear-gradient(to right, var(--color-plus) 0 100%, transparent 0) center / 9px 1px no-repeat,
    linear-gradient(to bottom right, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat,
    linear-gradient(to top right, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat;
}

/* ===== BOTTOM EDGE (last middle cell) ===== */
.tech-stack > div:nth-last-child(2)::before {
  content: "";
  position: absolute;
  bottom: -20px;
  left: -20px;
  width: 20px;
  height: 20px;
  background: linear-gradient(to top, var(--color-border-line) 0 100%, transparent 0) bottom left / 1px 20px no-repeat;
  transform: rotate(180deg);
}
.tech-stack > div:nth-last-child(2)::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  left: -5px;
  bottom: -5px;
  background:
    linear-gradient(to bottom, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat,
    linear-gradient(to right, var(--color-plus) 0 100%, transparent 0) center / 9px 1px no-repeat,
    linear-gradient(to bottom right, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat,
    linear-gradient(to top right, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat;
}

/* ===== BOTTOM-RIGHT CORNER (last cell) ===== */
.tech-stack > div:nth-last-child(1)::before {
  content: "";
  position: absolute;
  bottom: -20px;
  left: -20px;
  width: 20px;
  height: 20px;
  background: linear-gradient(to top, var(--color-border-line) 0 100%, transparent 0) bottom left / 1px 20px no-repeat;
  transform: rotate(180deg);
}
.tech-stack > div:nth-last-child(1)::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  left: -5px;
  bottom: -5px;
  background:
    linear-gradient(to bottom, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat,
    linear-gradient(to right, var(--color-plus) 0 100%, transparent 0) center / 9px 1px no-repeat,
    linear-gradient(to bottom right, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat,
    linear-gradient(to top right, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat;
}
.tech-stack > div:nth-last-child(1) > div::before {
  content: "";
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 20px;
  height: 20px;
  background:
    linear-gradient(to right, var(--color-border-line) 0 100%, transparent 0) bottom right / 20px 1px no-repeat,
    linear-gradient(to top, var(--color-border-line) 0 100%, transparent 0) bottom left / 1px 20px no-repeat;
  transform: rotate(90deg);
}
.tech-stack > div:nth-last-child(1) > div::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  right: -5px;
  bottom: -5px;
  background:
    linear-gradient(to bottom, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat,
    linear-gradient(to right, var(--color-plus) 0 100%, transparent 0) center / 9px 1px no-repeat,
    linear-gradient(to bottom right, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat,
    linear-gradient(to top right, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat;
}

.tech-stack > div > div {
  width: 100%;
  height: 100%;
  padding: 24px;
  position: relative;
  z-index: 2;
}

.chips {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
}

.chips span {
  font-weight: 400;
  font-size: 16px;
  line-height: 100%;
  width: fit-content;
  padding: 4px 12px;
  border: 1px solid var(--color-tag);
  color: var(--color-tag);
  border-radius: 49px;
}

.tech-title-h2 {
  font-weight: 500;
  font-size: 32px;
  line-height: 100%;
  color: var(--color-text-head);
}

.tech-title-h1 {
  margin-top: 42px;
  font-weight: 500;
  font-size: 48px;
  line-height: 100%;
  vertical-align: middle;
  color: var(--color-text-head);
}

.tech-stack > div:nth-child(2) > div,
.tech-stack > div:nth-child(3) > div,
.tech-stack > div:nth-child(4) > div,
.tech-stack > div:nth-child(5) > div,
.tech-stack > div:nth-child(7) > div,
.tech-stack > div:nth-child(8) > div {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 32px;
}

.tech-stack > div:nth-child(9) > div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: space-between;
  align-items: flex-start;
  gap: 59px;
}

.tech-stack > div:nth-child(9) > div .tech-title-h2 {
  font-weight: 500;
  font-size: 32px;
  line-height: 160%;
  color: #fff;
}

.tech-stack > div:nth-child(6) {
  position: relative;
  overflow: visible;
}

.tech-stack > div:nth-child(6) > div {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 24px;
  position: relative;
  z-index: 5;
}

.tech-stack > div:nth-child(6) > div > p {
  font-weight: 500;
  font-size: 32px;
  text-align: center;
  color: var(--color-text-head);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.tech-stack > div:nth-child(6) > div > button {
  font-weight: 500;
  font-size: 20px;
  line-height: 100%;
  text-align: center;
  vertical-align: middle;
  padding: 9px 0;
	width: 100%;
	max-width: 260px;
  border-radius: 40px;
  cursor: pointer;
/*   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); */
	box-shadow: 3px 3px 10px 0px rgb(247 243 243 / 30%), -3px -3px 10px 0px rgb(247 245 243 / 20%);
	
	  transition: all 0.3s ease;
  color: var(--color-button-text);
  background-color: var(--color-button-bg);
  border: 2px solid var(--color-button-bg);
}


.tech-stack > div:nth-child(6) .bubble {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

.bubble-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  background: var(--bubble-glow-bg);
  filter: blur(60px);
  border-radius: 50%;
  opacity: 0;
}

.get-touch-box.modular {
  padding: 70px 40px;
}

.get-touch-box.modular > p {
  font-size: 64px;
  line-height: 84px;
}

.get-touch.bodular-box {
  margin: 0 0 160px 0;
}

.tech-stack-progress-overlay {
	display: none;
}
/* Make the inner container relative so the overlay can be positioned absolutely */
.tech-stack > div:first-child > div {
    position: relative;
}

/* The overlay itself – covers the whole cell */
.tech-stack-progress-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;          /* will be updated via JS */
    height: 100%;
    background: rgba(128, 128, 128, 0.3); /* gray with 30% opacity – adjust to your taste */
    pointer-events: none; /* allow clicks to pass through to button/text */
    z-index: 1;          /* behind the text */
    transition: width 0.1s ease-out; /* smooth update */
}

/* Ensure the title stays above the overlay */
.tech-title-h1 {
    position: relative;
    z-index: 2;
}

@media (hover: hover) and (pointer: fine) {
	.tech-stack > div:nth-child(6) > div > button:hover {
		background-color: var(--color-button-text-hover);
		color: var(--color-button-bg-hover);
		border-color: var(--color-button-bg-hover);
	}
}


@media screen and (max-width: 1440px) {
	.tech-stack {
		max-width: 960px;
		margin: 80px auto 0;
	}

	.tech-stack > div:nth-child(6) > div > p {
	  font-size: 28px;
	}
	
}

@media screen and (max-width: 1240px) {
	.tech-title-h1 { font-size: 40px; }
	.tech-title-h2 { font-size: 24px; }
}

@media (max-width: 1023px) {
	.tech-stack {
		margin: 64px 32px 0;
		max-width: none;
		width: auto;
	}
}

@media screen and (max-width: 768px) {
	.tech-stack {
		grid-template-columns: repeat(2, 1fr);
	}
	.tech-stack-box:nth-child(9) { display: none; }
	
	.tech-stack > div:nth-child(1)::before,
	.tech-stack > div:nth-child(1)::after,
	.tech-stack > div:nth-child(-n+3):not(:first-child)::before,
	.tech-stack > div:nth-child(-n+3):not(:first-child)::after,
	.tech-stack > div:nth-child(3) > div::before,
	.tech-stack > div:nth-child(3) > div::after, 
	.tech-stack > div:nth-child(3n+1):not(:first-child):not(:nth-last-child(3))::before,
	.tech-stack > div:nth-last-child(6)::after, 
	.tech-stack > div:nth-child(3n):not(:nth-child(3)):not(:nth-last-child(1))::before, 
	.tech-stack > div:nth-child(3n):not(:nth-child(3)):not(:nth-last-child(1))::after, 
	.tech-stack > div:nth-last-child(3)::before, 
	.tech-stack > div:nth-last-child(3)::after, 
	.tech-stack > div:nth-last-child(2)::before, 
	.tech-stack > div:nth-last-child(2)::after,
	.tech-stack > div:nth-last-child(1)::before, 
	.tech-stack > div:nth-last-child(1)::after,
	.tech-stack > div:nth-last-child(1) > div::before, 
	.tech-stack > div:nth-last-child(1) > div::after {
		content: none;
		top: unset;
		left: unset;
		bottom: unset;
		right: unset;
	}
	
	.tech-stack > div:nth-child(1)::before {
  content: "";
  position: absolute;
  top: -20px;
  left: -20px;
  width: 20px;
  height: 20px;
  background:
    linear-gradient(to right, var(--color-border-line) 0 100%, transparent 0) bottom left / 20px 1px no-repeat,
    linear-gradient(to top, var(--color-border-line) 0 100%, transparent 0) bottom left / 1px 20px no-repeat;
  transform: rotate(270deg);
}
.tech-stack > div:nth-child(1)::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  left: -5px;
  top: -5px;
  background:
    linear-gradient(to bottom, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat,
    linear-gradient(to right, var(--color-plus) 0 100%, transparent 0) center / 9px 1px no-repeat,
    linear-gradient(to bottom right, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat,
    linear-gradient(to bottom right, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat;
}

/* ===== TOP EDGE – left line & plus on all non‑first top‑row cells (now only cell 2) ===== */
.tech-stack > div:nth-child(-n+2):not(:first-child)::before {
  content: "";
  position: absolute;
  top: -20px;
  left: -20px;
  width: 20px;
  height: 20px;
  background: linear-gradient(to top, var(--color-border-line) 0 100%, transparent 0) bottom left / 1px 20px no-repeat;
  transform: rotate(180deg);
}
.tech-stack > div:nth-child(-n+2):not(:first-child)::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  left: -5px;
  top: -5px;
  background:
    linear-gradient(to bottom, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat,
    linear-gradient(to right, var(--color-plus) 0 100%, transparent 0) center / 9px 1px no-repeat,
    linear-gradient(to bottom right, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat,
    linear-gradient(to top right, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat;
}

/* ===== TOP-RIGHT CORNER (cell 2, via inner div) ===== */
.tech-stack > div:nth-child(2) > div::before {
  content: "";
  position: absolute;
  top: -20px;
  right: -20px;
  width: 20px;
  height: 20px;
  background:
    linear-gradient(to right, var(--color-border-line) 0 100%, transparent 0) bottom right / 20px 1px no-repeat,
    linear-gradient(to top, var(--color-border-line) 0 100%, transparent 0) bottom left / 1px 20px no-repeat;
  transform: rotate(360deg);
}
.tech-stack > div:nth-child(2) > div::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  right: -5px;
  top: -5px;
  background:
    linear-gradient(to bottom, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat,
    linear-gradient(to right, var(--color-plus) 0 100%, transparent 0) center / 9px 1px no-repeat,
    linear-gradient(to bottom right, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat,
    linear-gradient(to top right, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat;
}
	
	
.tech-stack > div:nth-child(2n+1):not(:first-child):not(:nth-last-child(3))::before {
  content: "";
  position: absolute;
  top: 0px;
  left: -20px;
  width: 20px;
  height: 20px;
  background: linear-gradient(to top, var(--color-border-line) 0 100%, transparent 0) bottom
    left / 1px 20px no-repeat;
  transform: rotate(90deg);
}

.tech-stack > div:nth-last-child(5)::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: -20px;
  width: 20px;
  height: 20px;
  background: linear-gradient(to top, var(--color-border-line) 0 100%, transparent 0) bottom
    left / 1px 20px no-repeat;
  transform: rotate(90deg);
}

.tech-stack > div:nth-child(2n):not(:nth-child(2)):not(:nth-last-child(2))::before {
  content: "";
  position: absolute;
  top: -20px;
  right: -20px;
  width: 20px;
  height: 20px;
  background: linear-gradient(to top, var(--color-border-line) 0 100%, transparent 0) bottom
    right / 1px 20px no-repeat;
  transform: rotate(90deg);
  z-index: 10;
}

.tech-stack.tech-stack > div:nth-child(2n):nth-last-child(4)::after {
  content: "";
  position: absolute;
  bottom: 0px;
  right: -20px;
  width: 20px;
  height: 20px;
  background: linear-gradient(to top, var(--color-border-line) 0 100%, transparent 0) bottom
    right / 1px 20px no-repeat;
  transform: rotate(90deg);
  z-index: 10;
}
	
.tech-stack > div:nth-last-child(3)::before {
  content: "";
  position: absolute;
  bottom: -20px;
  left: -20px;
  width: 20px;
  height: 20px;
  background:
    linear-gradient(to right, var(--color-border-line) 0 100%, transparent 0) bottom left / 20px 1px no-repeat,
    linear-gradient(to top, var(--color-border-line) 0 100%, transparent 0) bottom left / 1px 20px no-repeat;
  transform: rotate(180deg);
}
.tech-stack > div:nth-last-child(3)::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  left: -5px;
  bottom: -5px;
  background:
    linear-gradient(to bottom, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat,
    linear-gradient(to right, var(--color-plus) 0 100%, transparent 0) center / 9px 1px no-repeat,
    linear-gradient(to bottom right, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat,
    linear-gradient(to top right, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat;
}

.tech-stack > div:nth-last-child(2)::before {
  content: "";
  position: absolute;
  bottom: -20px;
  left: -20px;
  width: 20px;
  height: 20px;
  background: linear-gradient(to top, var(--color-border-line) 0 100%, transparent 0) bottom left / 1px 20px no-repeat;
  transform: rotate(180deg);
}
.tech-stack > div:nth-last-child(2)::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  left: -5px;
  bottom: -5px;
  background:
    linear-gradient(to bottom, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat,
    linear-gradient(to right, var(--color-plus) 0 100%, transparent 0) center / 9px 1px no-repeat,
    linear-gradient(to bottom right, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat,
    linear-gradient(to top right, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat;
}
.tech-stack > div:nth-last-child(2) > div::before {
  content: "";
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 20px;
  height: 20px;
  background:
    linear-gradient(to right, var(--color-border-line) 0 100%, transparent 0) bottom right / 20px 1px no-repeat,
    linear-gradient(to top, var(--color-border-line) 0 100%, transparent 0) bottom left / 1px 20px no-repeat;
  transform: rotate(90deg);
}
.tech-stack > div:nth-last-child(2) > div::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  right: -5px;
  bottom: -5px;
  background:
    linear-gradient(to bottom, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat,
    linear-gradient(to right, var(--color-plus) 0 100%, transparent 0) center / 9px 1px no-repeat,
    linear-gradient(to bottom right, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat,
    linear-gradient(to top right, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat;
}

}
	
@media screen and (max-width: 520px) {
		.tech-stack-progress-overlay {
	display: block;
}
    .tech-stack > div:first-child {
        position: sticky;
        top: 124px;
        z-index: 10;
		height: 73px;
        background: var(--color-background); 
    }
		.tech-title-h1 {
			margin-top: 0;
		}
		
		.tech-stack > div > div {
			padding: 16px;
		}
		.tech-stack {
			display: block;
		}
		.tech-stack-box {
			height: unset;
		}
    .tech-stack > div:first-child::before,
    .tech-stack > div:first-child::after {
        /* Keep pseudo-elements for border corners; they will still appear */
        /* But if they interfere, you can hide them while sticky: */
        /* display: none; */
    }

    /* To prevent content from peeking through the sticky header, 
       add a background to the container of the first box if needed */
    .tech-stack > div:first-child > div {
        background: inherit; 
    }
}

@media screen and (max-width: 520px) {
	.tech-stack {
		margin: 54px 16px 0;
		grid-template-columns: repeat(1, 1fr);
	}
	
	.tech-stack > div:nth-child(1)::before,
	.tech-stack > div:nth-child(1)::after,
	.tech-stack > div:nth-child(-n+2):not(:first-child)::before,
	.tech-stack > div:nth-child(-n+2):not(:first-child)::after,
	.tech-stack > div:nth-child(2) > div::before,
	.tech-stack > div:nth-child(2) > div::after,
	.tech-stack > div:nth-child(2n+1):not(:first-child):not(:nth-last-child(3))::before,
	.tech-stack > div:nth-last-child(5)::after,
	.tech-stack > div:nth-child(2n):not(:nth-child(2)):not(:nth-last-child(2))::before,
	.tech-stack.tech-stack > div:nth-child(2n):nth-last-child(4)::after,
	.tech-stack > div:nth-last-child(3)::before,
	.tech-stack > div:nth-last-child(3)::after,
	.tech-stack > div:nth-last-child(2)::before,
	.tech-stack > div:nth-last-child(2)::after,
	.tech-stack > div:nth-last-child(2) > div::before,
	.tech-stack > div:nth-last-child(2) > div::after {
  	content: none;
  	top: unset;
	left: unset;
	right: unset;
	bottom: unset;
}
	
	  .tech-stack.tech-stack > div:nth-child(1)::before {
    content: "";
    position: absolute;
    top: -20px;
    left: -20px;
    width: 20px;
    height: 20px;
    background:
      linear-gradient(to right, var(--color-border-line) 0 100%, transparent 0) bottom left / 20px 1px no-repeat,
      linear-gradient(to top, var(--color-border-line) 0 100%, transparent 0) bottom left / 1px 20px no-repeat;
    transform: rotate(270deg);
  }
  .tech-stack.tech-stack > div:nth-child(1)::after {
    content: "";
    position: absolute;
    width: 9px;
    height: 9px;
    left: -5px;
    top: -5px;
    background:
      linear-gradient(to bottom, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat,
      linear-gradient(to right, var(--color-plus) 0 100%, transparent 0) center / 9px 1px no-repeat,
      linear-gradient(to bottom right, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat,
      linear-gradient(to bottom right, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat;
  }

  /* ===== TOP-RIGHT CORNER (cell 1, via inner div) ===== */
  .tech-stack.tech-stack > div:nth-child(1) > div::before {
    content: "";
    position: absolute;
    top: -20px;
    right: -20px;
    width: 20px;
    height: 20px;
    background:
      linear-gradient(to right, var(--color-border-line) 0 100%, transparent 0) bottom right / 20px 1px no-repeat,
      linear-gradient(to top, var(--color-border-line) 0 100%, transparent 0) bottom left / 1px 20px no-repeat;
    transform: rotate(360deg);
  }
  .tech-stack.tech-stack > div:nth-child(1) > div::after {
    content: "";
    position: absolute;
    width: 9px;
    height: 9px;
    right: -5px;
    top: -5px;
    background:
      linear-gradient(to bottom, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat,
      linear-gradient(to right, var(--color-plus) 0 100%, transparent 0) center / 9px 1px no-repeat,
      linear-gradient(to bottom right, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat,
      linear-gradient(to top right, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat;
  }

  /* ===== BOTTOM-LEFT CORNER (second‑last child = cell 8) ===== */
.tech-stack.tech-stack > div:nth-last-child(2)::before {
  content: "";
  position: absolute;
  bottom: -20px;
  left: -20px;
  width: 20px;
  height: 20px;
  background:
    linear-gradient(to right, var(--color-border-line) 0 100%, transparent 0) bottom left / 20px 1px no-repeat,
    linear-gradient(to top, var(--color-border-line) 0 100%, transparent 0) bottom left / 1px 20px no-repeat;
  transform: rotate(180deg);
}
.tech-stack.tech-stack > div:nth-last-child(2)::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  left: -5px;
  bottom: -5px;
  background:
    linear-gradient(to bottom, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat,
    linear-gradient(to right, var(--color-plus) 0 100%, transparent 0) center / 9px 1px no-repeat,
    linear-gradient(to bottom right, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat,
    linear-gradient(to top right, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat;
}

/* ===== BOTTOM-RIGHT CORNER (second‑last child, via inner div) ===== */
.tech-stack.tech-stack > div:nth-last-child(2) > div::before {
  content: "";
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 20px;
  height: 20px;
  background:
    linear-gradient(to right, var(--color-border-line) 0 100%, transparent 0) bottom right / 20px 1px no-repeat,
    linear-gradient(to top, var(--color-border-line) 0 100%, transparent 0) bottom left / 1px 20px no-repeat;
  transform: rotate(90deg);
}
.tech-stack.tech-stack > div:nth-last-child(2) > div::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  right: -5px;
  bottom: -5px;
  background:
    linear-gradient(to bottom, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat,
    linear-gradient(to right, var(--color-plus) 0 100%, transparent 0) center / 9px 1px no-repeat,
    linear-gradient(to bottom right, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat,
    linear-gradient(to top right, var(--color-plus) 0 100%, transparent 0) center / 1px 9px no-repeat;
}
	
	.tech-stack > div:nth-child(n):not(:first-child):not(:nth-last-child(2)):not(:last-child)::before {
  content: "";
  position: absolute;
  top: 0px;
  left: -20px;
  width: 20px;
  height: 20px;
  background: linear-gradient(to top, var(--color-border-line) 0 100%, transparent 0) bottom
    left / 1px 20px no-repeat;
  transform: rotate(90deg);
}

.tech-stack.tech-stack > div:nth-last-child(3)::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: -20px;
  width: 20px;
  height: 20px;
  background: linear-gradient(to top, var(--color-border-line) 0 100%, transparent 0) bottom
    left / 1px 20px no-repeat;
  transform: rotate(90deg);
}

.tech-stack.tech-stack > div:nth-child(n):not(:first-child):not(:nth-last-child(2)):not(:last-child) > div::before {
  content: "";
  position: absolute;
  top: -20px;
  right: -20px;
  width: 20px;
  height: 20px;
  background: linear-gradient(to top, var(--color-border-line) 0 100%, transparent 0) bottom
    right / 1px 20px no-repeat;
  transform: rotate(90deg);
  z-index: 10;
}

.tech-stack.tech-stack > div:nth-last-child(3) > div::after {
  content: "";
  position: absolute;
  bottom: 0px;
  right: -20px;
  width: 20px;
  height: 20px;
  background: linear-gradient(to top, var(--color-border-line) 0 100%, transparent 0) bottom
    right / 1px 20px no-repeat;
  transform: rotate(90deg);
  z-index: 10;
}
	
	
}