body.detail-page {
  min-height: 100svh;
  background: #f8f8f6;
}
[data-theme="dark"] body.detail-page { background: #08090a; }
.detail-page .atmosphere { position: fixed; pointer-events: none; }
.detail-back {
  position: fixed;
  z-index: 3;
  inset-block-start: var(--top-controls-inset);
  inset-inline-start: max(16px, env(safe-area-inset-left));
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  color: inherit;
  font-size: 22px;
  text-decoration: none;
}
.detail-back:focus-visible, .detail-action:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
.detail-page .brand { pointer-events: auto; }
.detail-brand {
  color: inherit;
  display: block;
  width: 100%;
  aspect-ratio: 1104 / 280;
  background: currentColor;
  -webkit-mask: url("./iyven-wordmark.svg") center / contain no-repeat;
  mask: url("./iyven-wordmark.svg") center / contain no-repeat;
}
.detail-main {
  position: relative;
  width: min(1180px, calc(100% - clamp(36px, 10vw, 156px)));
  margin-inline: auto;
  padding-block: clamp(118px, 17vh, 170px) 68px;
}
.detail-title {
  margin: 0;
  font-size: clamp(42px, 7.4vw, 104px);
  line-height: .98;
  font-weight: 570;
  letter-spacing: -.062em;
  text-wrap: balance;
}
.detail-lead, .project-description {
  margin: 19px 0 0;
  line-height: 1.55;
  opacity: .86;
  text-wrap: pretty;
}
.detail-lead { max-width: 38ch; font-size: clamp(16px, 1.6vw, 21px); }
.detail-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 46px;
  margin-top: 24px;
  padding: 9px 18px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: inherit;
  font-size: 14px;
  font-weight: 620;
  text-decoration: none;
}
.detail-action:hover { background: color-mix(in srgb, currentColor 9%, transparent); }
.contact-layout {
  min-height: 88svh;
  display: grid;
  grid-template-columns: 1fr .88fr;
  align-items: center;
  gap: clamp(34px, 8vw, 100px);
}
.detail-glass {
  position: relative;
  isolation: isolate;
  border: 1px solid #ffffffd9;
  border-radius: clamp(17px, 3vw, 36px);
  background: linear-gradient(145deg,#ffffff76,#dcd8ff2d 46%,#b4cbf636 75%,#ffffff71);
  box-shadow: inset 0 0 0 1px #fff9, inset 0 -2px 6px #9c91d369, 0 20px 50px #3d468324;
  backdrop-filter: blur(14px) saturate(112%);
}
[data-theme="dark"] .detail-glass {
  border-color: #9c9bc9a3;
  background: linear-gradient(145deg,#bec4f24a,#34305437 48%,#8187bf55);
  box-shadow: inset 0 0 0 1px #dce2ff45, inset 0 -3px 8px #b7a6f050, 0 22px 58px #0006;
}
.contact-glass {
  aspect-ratio: 1.18;
  display: grid;
  place-items: center;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transform: translate(var(--contact-x, 0px), var(--contact-y, 0px))
    perspective(1050px) rotateY(-13deg) rotateX(7deg) rotateZ(-4deg);
  transition: transform 280ms cubic-bezier(.2,.75,.25,1);
}
.contact-glass:focus-visible { outline: 2px solid currentColor; outline-offset: 6px; }
.contact-glass:hover svg { opacity: .9; }
.contact-glass svg {
  width: 32%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  opacity: .65;
  transition: opacity 240ms ease;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: clamp(32px, 5vw, 68px);
  margin-top: clamp(38px, 6vw, 85px);
}
.project-frame {
  margin: 0 0 25px;
  padding: clamp(8px, 1vw, 16px);
  transform: perspective(1100px) rotateY(-7deg) rotateX(5deg);
  animation: project-glass-enter 980ms cubic-bezier(.19,.68,.24,1) both;
}
.project-card:nth-child(2) .project-frame { transform: perspective(1100px) rotateY(7deg) rotateX(5deg); animation-delay: 110ms; }
.project-viewport {
  position: relative;
  overflow: hidden;
  aspect-ratio: 8 / 5;
  border-radius: clamp(11px, 2vw, 25px);
}
.project-viewport img, .project-wire { position: absolute; inset: 0; width: 100%; height: 100%; }
.project-viewport img { object-fit: cover; object-position: top; }
.project-wire { display: none; stroke: currentColor; fill: none; stroke-width: .65; pointer-events: none; }
.project-viewport[data-build] img { clip-path: inset(0 0 100%); }
.project-viewport[data-build] .project-wire { display: block; }
.project-wire path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.project-viewport[data-playing] .project-wire path { animation: draw-project 1190ms ease forwards; animation-delay: calc(420ms + var(--wire-delay, 0ms) * 1.9); }
.project-viewport[data-playing] .project-wire { animation: hide-wire 780ms 2290ms ease forwards; }
.project-viewport[data-playing] img { animation: unveil-project 1280ms 2220ms cubic-bezier(.2,.7,.24,1) forwards; }
@keyframes project-glass-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes draw-project { to { stroke-dashoffset: 0; } }
@keyframes hide-wire { to { opacity: 0; } }
@keyframes unveil-project { to { clip-path: inset(0); } }
.project-card h2 { margin: 0; font-size: clamp(25px,3vw,44px); font-weight: 580; letter-spacing: -.05em; }
.project-description { margin-top: 8px; max-width: 45ch; }
.project-card .detail-action { margin-top: 15px; }
.detail-main .detail-lead, .detail-main [data-i18n] { opacity: var(--language-opacity, 1); }
@media (max-width: 700px) {
  .contact-layout, .projects-grid { grid-template-columns: 1fr; }
  .contact-layout { align-content: center; gap: 32px; }
  .contact-glass { order: -1; width: min(76%, 320px); margin-inline: auto; }
  .projects-grid { gap: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .project-frame { animation: none; }
  .contact-glass, .contact-glass svg { transition: none; }
  .project-viewport[data-build] img { clip-path: none; animation: none; }
  .project-viewport[data-build] .project-wire { display: none; }
}
