.work-hero {
  width: min(1280px, 100% - 48px);
  height: calc(100svh - var(--site-header-height));
  min-height: 580px;
  margin: auto;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.work-grid-bg {
  position: absolute;
  inset: 0 -20vw 0 52%;
  background-image: linear-gradient(#ffffff08 1px, transparent 1px),
    linear-gradient(90deg, #ffffff08 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: radial-gradient(circle, #000, transparent 74%);
  mask-image: radial-gradient(circle, #000, transparent 74%);
}

.work-hero-copy {
  width: min(58%, 780px);
  position: relative;
  z-index: 2;
}

.work-hero h1 {
  margin: clamp(22px, 4svh, 38px) 0 clamp(18px, 3svh, 28px);
  font-size: clamp(4rem, min(7.9vw, 12svh), 8.4rem);
  line-height: .88;
  letter-spacing: -.07em;
}

.work-hero-copy p {
  color: #9699a6;
  max-width: 660px;
  font-size: clamp(.95rem, 1.3vw, 1.12rem);
  line-height: 1.7;
}

.work-hero-visual {
  width: min(46vw, 580px);
  aspect-ratio: 1;
  position: absolute;
  z-index: 1;
  right: -1%;
  display: grid;
  place-items: center;
}

.work-orbit {
  position: absolute;
  border: 1px solid #6681ff26;
  border-radius: 50%;
}

.orbit-a {
  width: 72%;
  height: 72%;
  animation: spin 22s linear infinite;
}

.orbit-b {
  width: 96%;
  height: 96%;
  border-style: dashed;
  animation: spin 34s linear infinite reverse;
}

.work-orbit::after {
  content: "";
  width: 7px;
  height: 7px;
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #6f73ff;
  box-shadow: 0 0 18px #5f73ff;
}

.orbit-b::after {
  background: #8b5cff;
  box-shadow: 0 0 18px #8156ff;
}

.work-orbit-dot {
  display: none;
}

.work-logo-stage {
  width: 74%;
  aspect-ratio: 1;
  border: 0;
  border-radius: 0;
  display: grid;
  place-items: center;
  background: transparent;
  box-shadow: none;
  animation: workLogoFloat 5s ease-in-out infinite;
}

.work-logo-stage img {
  width: 100%;
  max-width: none;
  border-radius: 0;
  filter: drop-shadow(0 28px 55px rgba(105, 65, 255, .24));
  animation: workLogoBreathe 4s ease-in-out infinite;
}

.work-signal {
  position: absolute;
  min-width: 62px;
  padding: 8px 11px;
  border: 1px solid #6d86ff48;
  border-radius: 100px;
  background: #0c111ddd;
  color: #9eb0ff;
  text-align: center;
  font: 600 .62rem var(--font-geist-mono);
  letter-spacing: .12em;
  box-shadow: 0 12px 35px #0008;
}

.signal-a { top: 14%; left: 12%; }
.signal-b { top: 25%; right: 2%; }
.signal-c { bottom: 18%; left: 3%; }
.signal-d { bottom: 7%; right: 20%; color: #b89cff; }

.projects {
  min-height: 100svh;
  padding-block: clamp(26px, 4svh, 44px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.projects-heading {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 70px;
  align-items: end;
  margin-bottom: clamp(15px, 2.4svh, 26px);
}

.projects-heading h2 {
  width: max-content;
  max-width: none;
  white-space: nowrap;
  margin-top: clamp(6px, 1svh, 10px);
  font-size: clamp(2rem, min(3.45vw, 5.2svh), 3.7rem);
  line-height: .92;
  letter-spacing: -.06em;
}

.projects-heading > p {
  color: #8c8f9c;
  max-width: 460px;
  line-height: 1.75;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(9px, min(1.15vw, 1.8svh), 17px);
}

.project-tile {
  min-height: clamp(285px, calc((100svh - 120px) / 2), 420px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, #0c101b, #08090e);
  padding: clamp(12px, min(1.45vw, 2svh), 20px);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  color: #f4f1e9;
  transition: transform .28s, border-color .28s, background .28s;
}

a.project-tile:hover {
  transform: translateY(-5px);
  border-color: #6381ff70;
  background: linear-gradient(145deg, #111a30, #08090e);
}

.project-tile::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  top: -80px;
  right: -70px;
  border-radius: 50%;
  background: #315cff;
  opacity: .13;
  filter: blur(55px);
}

.tile-hris::after { background: #7555ff; }
.tile-ready::after { background: #f0b23f; }
.tile-syob::after { background: #65d497; }

.tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 2;
  color: #737785;
  font: 500 .58rem var(--font-geist-mono);
  text-transform: uppercase;
  letter-spacing: .12em;
}

.tile-top b {
  color: #9cb0ff;
  padding: 4px 7px;
  border: 1px solid #5d7aff36;
  border-radius: 100px;
  background: #4d70ff12;
  font-size: .54rem;
}

.website-preview {
  height: clamp(145px, 21svh, 215px);
  margin: clamp(8px, 1.35svh, 14px) 0 clamp(7px, 1.1svh, 11px);
  border: 1px solid #ffffff0e;
  border-radius: 11px;
  background: #f0f1f4;
  position: relative;
  overflow: hidden;
}

.website-preview iframe {
  width: 1280px;
  height: 720px;
  position: absolute;
  top: 0;
  left: 0;
  border: 0;
  transform: scale(.275);
  transform-origin: top left;
  pointer-events: none;
}

.tile-cmpos .website-preview iframe,
.tile-hris .website-preview iframe {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(.275);
  transform-origin: center;
}

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

.syob-live-preview > span {
  display: none;
  position: absolute;
  inset: 0;
  place-items: center;
  color: #7f8390;
  background: #0c0f17;
  font-size: .7rem;
}

.tile-copy {
  margin-top: auto;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 15px;
  position: relative;
  z-index: 2;
}

.tile-copy h2 {
  font-size: clamp(1.18rem, 1.6vw, 1.55rem);
  line-height: 1;
  letter-spacing: -.035em;
}

.tile-copy p {
  margin-top: 7px;
  color: #777b88;
  font-size: clamp(.62rem, .72vw, .72rem);
  line-height: 1.4;
}

.tile-arrow {
  flex: 0 0 auto;
  width: 31px;
  height: 31px;
  border: 1px solid #ffffff18;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #b8c4ff;
  transition: transform .25s, background .25s;
}

a.project-tile:hover .tile-arrow {
  transform: rotate(7deg);
  background: #5576ff22;
}

.tile-upcoming {
  background: linear-gradient(145deg, #0a0b11, #07080c);
}

.tile-upcoming .tile-top b { color: #777b88; border-color: #ffffff14; background: #ffffff06; }

.coming-preview {
  height: clamp(145px, 21svh, 215px);
  margin: clamp(8px, 1.35svh, 14px) 0 clamp(7px, 1.1svh, 11px);
  border: 1px dashed #ffffff13;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #4e5361;
  background: repeating-linear-gradient(135deg, #ffffff02 0 8px, transparent 8px 16px);
}

.coming-preview span {
  font-size: 2rem;
  font-weight: 200;
}

nav [aria-current="page"] { color: #f4f1e9; }

@keyframes workLogoFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-12px) rotate(1deg); }
}

@keyframes workLogoGlow {
  0%, 100% { box-shadow: inset 0 0 70px #315cff1b, 0 35px 100px #0009; }
  50% { box-shadow: inset 0 0 95px #6e54ff30, 0 42px 115px #214eff30; }
}

@keyframes workLogoBreathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.055); }
}

@media (prefers-reduced-motion: reduce) {
  .work-logo-stage,
  .work-logo-stage img,
  .work-orbit {
    animation: none;
  }
}

@media (min-width: 901px) and (max-height: 720px) {
  .projects {
    padding-block: 28px;
  }

  .projects-heading {
    margin-bottom: 18px;
  }

  .projects-heading h2 {
    font-size: clamp(2rem, 5.4svh, 2.9rem);
  }

  .projects-heading > p {
    font-size: .78rem;
    line-height: 1.5;
  }

  .project-tile {
    min-height: 260px;
  }

  .website-preview,
  .coming-preview {
    height: clamp(120px, 17svh, 145px);
  }

  .tile-copy h2 {
    font-size: 1rem;
  }

  .tile-copy p {
    margin-top: 4px;
    font-size: .58rem;
  }
}

@media (max-width: 900px) {
  .work-hero-copy { width: 68%; }
  .work-hero-visual { right: -20%; opacity: .7; }
  .projects-heading { grid-template-columns: 1fr; gap: 25px; }
  .projects-heading h2 {
    width: auto;
    white-space: normal;
  }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-tile { min-height: 270px; }
}

@media (max-width: 640px) {
  .work-hero {
    width: min(100% - 28px, 1280px);
    height: auto;
    min-height: calc(100svh - var(--site-header-height));
  }

  .work-hero {
    padding-block: 45px 28px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
  .work-hero-copy { width: 100%; position: relative; z-index: 2; }
  .work-hero h1 { font-size: clamp(2.9rem, 14vw, 4.3rem); }
  .work-hero-visual {
    width: min(92vw, 430px);
    height: min(92vw, 430px);
    margin: 20px auto 0;
    position: relative;
    inset: auto;
    opacity: .72;
    transform: scale(.88);
  }
  .projects { padding-block: 80px 70px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-tile { min-height: 270px; }
  .website-preview, .coming-preview { height: 135px; }
}

@media (max-width: 420px) {
  .work-hero h1 {
    font-size: clamp(2.65rem, 13vw, 3.5rem);
  }
  .work-hero-copy p {
    font-size: .94rem;
    line-height: 1.6;
  }
  .work-signal {
    font-size: .68rem;
    padding: 7px 10px;
  }
  .projects-heading h2 {
    font-size: clamp(2.3rem, 11vw, 3rem);
  }
}
