.ath-work {
  --work-ink: #101a2c;
  --work-paper: #f2f5fa;
  --work-accent: #005cc8;
  --work-line: #bdc9da;
  background: var(--work-paper);
  color: var(--work-ink);
  padding: clamp(112px, 11vw, 175px) 0 clamp(48px, 7vw, 100px);
}

.ath-work-inner {
  width: min(1440px, calc(100% - clamp(32px, 8vw, 144px)));
  margin-inline: auto;
}

.ath-work-intro,
.ath-work-next {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: 24px;
}

.ath-work-intro {
  margin-bottom: clamp(24px, 5vw, 64px);
}

.ath-work-intro-side {
  width: min(100%, 25rem);
}

.ath-work-index {
  border-top: 1px solid var(--work-line);
}

.ath-work-index a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  min-height: 48px;
  padding: 9px 2px;
  border-bottom: 1px solid var(--work-line);
  font-weight: 700;
}

.ath-work-index a span:last-child {
  font-size: .875rem;
  font-weight: 500;
}

.ath-work-index a:hover,
.ath-work-index a:focus-visible {
  color: var(--work-accent);
}

.ath-work-label {
  color: var(--work-accent);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .075em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.ath-work h1 {
  color: var(--work-ink);
  font: 700 clamp(4.5rem, 13vw, 12rem)/.8 var(--tp-ff-thunder, sans-serif);
  letter-spacing: -.015em;
  margin: 0;
}

.ath-work h1 em {
  color: var(--work-accent);
  font-style: normal;
}

.ath-work-card-body > p:not(.ath-work-label) {
  color: inherit;
  font-size: 1.05rem;
  line-height: 1.5;
}

.ath-work-button,
.ath-work-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
}

.ath-work-button {
  padding: 9px 18px;
  border: 1px solid var(--work-ink);
  border-radius: 100px;
}

.ath-work-button:hover,
.ath-work-button:focus-visible {
  background: var(--work-ink);
  color: var(--work-paper);
}

.ath-work-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: .25em;
}

.ath-work-link:hover,
.ath-work-link:focus-visible {
  color: var(--work-accent);
}

.ath-work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(16px, 2vw, 28px);
}

.ath-work-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--work-line);
  border-radius: 20px;
  overflow: hidden;
  background: #ffffff;
  scroll-margin-top: 80px;
}

.ath-work-featured {
  background: #101a2c;
  color: #f5f8ff;
  border-color: #101a2c;
}

.ath-work-featured .ath-work-label,
.ath-work-featured .ath-work-link:hover,
.ath-work-featured .ath-work-link:focus-visible {
  color: #9acaff;
}

.ath-work-media {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: clamp(12px, 3vw, 44px);
  min-height: 0;
}

.ath-work-media-featured {
  background: radial-gradient(ellipse at 30% 15%, #70bbff 0%, #186fdb 60%, #13468e 100%);
}

.ath-work-media-menu {
  background: radial-gradient(ellipse at 65% 20%, #fff4d7, #f5bd75);
}

.ath-work-media-arcade {
  background: radial-gradient(ellipse at 50% 25%, #47408d, #191634);
}

.ath-work-media video,
.ath-work-media img {
  display: block;
  width: auto;
  max-width: 100%;
  height: clamp(170px, 27vw, 340px);
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 12px 28px #101a2c42;
}

.ath-work-media-featured video {
  width: 100%;
  height: auto;
}

.ath-work-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: start;
  justify-content: center;
  min-width: 0;
  padding: clamp(20px, 4vw, 54px);
}

.ath-work-card-body h2 {
  color: inherit;
  font: 700 clamp(2.5rem, 5vw, 5rem)/.92 var(--tp-ff-thunder, sans-serif);
  margin-bottom: 12px;
}

.ath-work-card .ath-work-link {
  padding: 0 15px;
  border: 1px solid currentColor;
  border-radius: 100px;
  text-decoration: none;
}

.ath-work-arcade {
  color: #f8f4ff;
  background: #191634;
  border-color: #191634;
}

.ath-work-arcade .ath-work-label,
.ath-work-arcade .ath-work-link:hover,
.ath-work-arcade .ath-work-link:focus-visible {
  color: #cbc1ff;
}

.ath-work-card:not(.ath-work-featured) .ath-work-link {
  margin-top: auto;
}

.ath-work-next {
  align-items: center;
  border-top: 1px solid var(--work-line);
  padding-top: 20px;
  margin-top: clamp(24px, 4vw, 48px);
}

@media (min-width: 768px) {
  .ath-work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ath-work-grid > .ath-work-card:nth-child(3n + 1) {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  }

  .ath-work-grid > .ath-work-card:nth-child(3n) {
    --project-reveal-delay: .14s;
  }
}

footer .px-copyright-big-text {
  font-size: min(260px, 12vw);
  font-size: min(260px, 14cqi);
}

@media (max-width: 767.98px) {
  .ath-work-media video,
  .ath-work-media img {
    height: auto;
    max-height: 260px;
  }
}

.ath-work-index a {
  position: relative;
  padding-inline-start: 16px;
}

.ath-work-index a::before {
  position: absolute;
  inset-inline-start: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--project-color, #005cc8);
  content: "";
}

.ath-work-index a[href="#my-menu-os"] {
  --project-color: #a15216;
}

.ath-work-index a[href="#chai-runner"] {
  --project-color: #5644b9;
}

.ath-work-card:target {
  outline: 2px solid var(--work-accent);
  outline-offset: 4px;
}

.ath-work-preview {
  width: min(100%, 460px);
  min-width: 0;
  overflow: hidden;
  border: 1px solid #ffffff45;
  border-radius: 12px;
  background: #101a2c;
  box-shadow: 0 18px 45px #101a2c55;
}

.ath-work-media-featured .ath-work-preview {
  width: 100%;
}

.ath-work-preview-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 9px 14px;
  color: #e8effc;
  font-size: .8125rem;
  line-height: 1.4;
}

.ath-work-preview video {
  width: 100%;
  height: auto;
  max-height: none;
  border-radius: 0;
  box-shadow: none;
}

.ath-work-game-preview {
  position: relative;
  width: min(100%, 280px);
}

.ath-work-game-preview img:first-child {
  width: 100%;
  height: auto;
  border: 3px solid #7666c4;
  border-radius: 14px;
}

.ath-work-game-preview .ath-work-game-sprite {
  position: absolute;
  right: -8px;
  bottom: -8px;
  width: clamp(48px, 7vw, 72px);
  height: auto;
  padding: 7px;
  border-radius: 14px;
  background: #c9baff;
  transform: rotate(10deg);
}

.ath-work-title-line {
  display: block;
}

.ath-work-client {
  --client-paper: #edf1fa;
  --client-accent: #284876;
}

.ath-work-client .ath-work-label {
  color: var(--client-accent);
}

.ath-client-saffron { --client-paper: #fff0d7; --client-accent: #a04418; }
.ath-client-rose { --client-paper: #ffeaf0; --client-accent: #982c50; }
.ath-client-mint { --client-paper: #d9f4e6; --client-accent: #165b40; }
.ath-client-blue { --client-paper: #dcecff; --client-accent: #0054ad; }
.ath-client-sand { --client-paper: #f5e9d4; --client-accent: #765525; }
.ath-client-lilac { --client-paper: #eee6ff; --client-accent: #554097; }

.ath-client-art {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: clamp(180px, 26vw, 360px);
  place-items: center;
  overflow: hidden;
  padding: clamp(16px, 3vw, 38px);
  background: radial-gradient(ellipse at top left, #fff, var(--client-paper) 75%);
}

.ath-client-art::before,
.ath-client-art::after {
  position: absolute;
  z-index: -1;
  width: 73%;
  aspect-ratio: 1;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--client-accent);
  opacity: .16;
  content: "";
}

.ath-client-art::after {
  width: 90%;
}

.ath-client-art img {
  width: 100%;
  height: clamp(72px, 10vw, 132px);
  max-width: 230px;
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
}

.ath-client-type {
  color: var(--client-accent);
  font: 700 clamp(2.4rem, 6vw, 5.25rem)/.78 var(--tp-ff-thunder, sans-serif);
  text-align: center;
}

.ath-client-type span {
  display: block;
  margin-top: .1em;
}

@media (prefers-reduced-motion: no-preference) {
  .ath-work-title-line {
    animation: ath-title-enter .75s cubic-bezier(.2, .8, .2, 1) both;
  }

  .ath-work-title-line + .ath-work-title-line {
    animation-delay: .13s;
  }

  .ath-work-index {
    animation: ath-index-enter .65s .17s ease-out both;
  }

  .ath-work-card.ath-project-pending:not(:focus-within) {
    opacity: 0;
  }

  .ath-project-enter:not(:focus-within) {
    animation: ath-project-reveal .72s cubic-bezier(.2, .7, .2, 1) var(--project-reveal-delay, 0s) backwards;
  }

  .ath-work-index a,
  .ath-client-art img,
  .ath-client-type,
  .ath-client-art::before,
  .ath-client-art::after {
    transition: transform .35s ease, background-color .25s ease;
  }

  .ath-work-index a:hover,
  .ath-work-index a:focus-visible {
    transform: translateX(4px);
    background-color: #e6edf7;
  }

  .ath-work-arcade.ath-project-enter .ath-work-game-sprite {
    animation: ath-chai-hop .65s .25s ease-out;
  }

  @media (hover: hover) {
    .ath-work-client:hover .ath-client-art img,
    .ath-work-client:hover .ath-client-type {
      transform: translateY(-5px) scale(1.06);
    }

    .ath-work-client:hover .ath-client-art::before,
    .ath-work-client:hover .ath-client-art::after {
      transform: scale(1.18);
    }
  }
}

@keyframes ath-title-enter {
  from { clip-path: inset(0 0 100%); transform: translateY(18px); }
  to { clip-path: inset(-.16em -.05em); transform: translateY(0); }
}

@keyframes ath-index-enter {
  from { opacity: .45; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes ath-project-reveal {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes ath-chai-hop {
  50% { transform: translateY(-18px) rotate(-12deg); }
}

.ath-work-card {
  cursor: pointer;
}

.ath-project-open {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
}

.ath-project-open:focus-visible,
.ath-project-close:focus-visible {
  outline: 2px solid #2888fa;
  outline-offset: 4px;
}

html:has(.ath-project-dialog[open]) {
  overflow: hidden;
}

.ath-project-dialog {
  position: fixed;
  inset: 0;
  width: min(920px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  padding: 0;
  margin: auto;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  background: #fff;
  color: #101a2c;
}

.ath-project-dialog::backdrop {
  background: #0a1426c9;
}

.ath-project-dialog-scroll {
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.ath-project-close {
  position: absolute;
  z-index: 1;
  top: 12px;
  right: 14px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #101a2c;
  font-size: 30px;
  line-height: 1;
}

.ath-project-dialog-media {
  display: grid;
  place-items: center;
  height: min(46dvh, 420px);
  min-height: 0;
  padding: 12px;
  background: radial-gradient(ellipse at top, #263d65, #101a2c);
}

.ath-project-dialog-media video,
.ath-project-dialog-media img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
  object-fit: contain;
}

.ath-project-dialog-media video {
  width: 100%;
  height: 100%;
}

.ath-project-dialog-media img {
  width: min(85%, 440px);
  height: 100%;
}

.ath-project-dialog-media .ath-client-type {
  color: #b6ffe2;
}

.ath-project-dialog-content {
  padding: clamp(20px, 4vw, 48px);
}

.ath-project-dialog-content .ath-work-label {
  color: #005cc8;
}

.ath-project-dialog-content h2 {
  margin: 0 0 20px;
  color: inherit;
  font: 700 clamp(2.6rem, 7vw, 5rem)/.9 var(--tp-ff-thunder, sans-serif);
}

.ath-project-dialog-content h3 {
  margin: 18px 0 5px;
  font-size: 1.125rem;
}

.ath-project-dialog-content p {
  max-width: 65ch;
  color: inherit;
  line-height: 1.6;
}

.ath-project-visit:not([hidden]) {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 8px 16px;
  border-radius: 100px;
  background: #005cc8;
  color: white;
}

@media (prefers-reduced-motion: no-preference) {
  .ath-project-dialog[open] {
    animation: ath-project-reveal .3s ease-out;
  }

  .ath-project-enter .ath-work-media {
    animation: ath-project-media-reveal .55s ease-out var(--project-reveal-delay, 0s) backwards;
  }
}

@keyframes ath-project-media-reveal {
  from { filter: brightness(.8); }
  to { filter: brightness(1); }
}
