.versions-page {
  min-height: 100vh;
  color: var(--text);
}

.versions-page .header {
  z-index: 10;
}

.versions-main {
  --version-grid-gap: clamp(22px, 3vw, 42px);
  position: relative;
  z-index: 1;
  width: min(1500px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(44px, 5vw, 72px) 0 72px;
}

.versions-hero {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  max-width: none;
  margin: 0 0 48px;
  padding: clamp(34px, 3.2vw, 48px) clamp(30px, 3.5vw, 52px) clamp(38px, 4vw, 56px);
  border: 1px solid rgba(0, 153, 255, .16);
  background:
    linear-gradient(rgba(46, 103, 170, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46, 103, 170, .045) 1px, transparent 1px),
    linear-gradient(100deg, rgba(1, 11, 24, .72), rgba(22, 20, 19, .56));
  background-size: 42px 42px, 42px 42px, auto;
  text-align: left;
}

.versions-hero h1 {
  margin: 12px 0 clamp(26px, 3vw, 40px);
  max-width: none !important;
}

.versions-hero h1 span {
  background: linear-gradient(90deg, #5f9eff 0%, #4c8de8 35%, #999b8e 64%, #ff9a31 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.versions-hero .section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-start;
  margin: 0;
  color: #a9caff;
  font-size: clamp(.92rem, 1.3vw, 1.22rem);
  letter-spacing: .12em;
}

.versions-hero .section-label-icon {
  display: block;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  filter: brightness(0) saturate(100%) invert(78%) sepia(93%) saturate(1108%) hue-rotate(349deg) brightness(103%);
}

.versions-hero > p:last-of-type {
  max-width: 1180px;
  margin: 0;
}

.versions-hero-divider {
  position: relative;
  display: block;
  width: 100%;
  height: 2px;
  margin-top: clamp(30px, 3.5vw, 46px);
  background: linear-gradient(90deg, transparent, #70a4ff 13%, #8db7ff 38%, #ffd778 57%, #ff962e 86%, transparent);
  box-shadow: 0 0 12px rgba(76, 147, 255, .48), 0 0 12px rgba(255, 156, 48, .36);
}

.versions-hero-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #ffd672;
  box-shadow: 0 0 8px #ffd672, 0 0 20px rgba(255, 174, 65, .88);
  transform: translate(-50%, -50%);
}

.version-grid {
  width: 100%;
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--version-grid-gap);
  align-items: stretch;
}

.version-card {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid rgba(0, 231, 255, .35);
  background: linear-gradient(145deg, rgba(5, 18, 36, .96), rgba(2, 6, 18, .98));
  box-shadow: var(--shadow-panel), inset 0 0 34px rgba(0, 153, 255, .05);
}

.version-card-newer {
  border-color: rgba(255, 139, 31, .42);
}

.version-meta {
  display: flex;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0, 231, 255, .18);
  font-family: var(--font-ui);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.version-meta time {
  color: var(--orange);
}

.version-preview {
  aspect-ratio: 16 / 9;
  height: auto;
  overflow: hidden;
  border-bottom: 1px solid rgba(0, 231, 255, .18);
  background: #fff;
}

.version-preview img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none !important;
  object-fit: cover;
  object-position: top center;
}

.version-content {
  padding: clamp(24px, 3vw, 38px);
}

.version-side {
  margin: 0 0 10px;
  color: var(--cyan);
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.version-card-newer .version-side {
  color: var(--orange);
}

.version-content h2 {
  margin: 0 0 14px;
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  text-transform: uppercase;
}

.version-content > p:not(.version-side) {
  min-height: 3.2em;
  color: var(--muted);
  line-height: 1.65;
}

.version-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  color: var(--text);
  font-family: var(--font-ui);
  font-weight: 800;
  letter-spacing: .06em;
  text-decoration: none;
  text-transform: uppercase;
}

.version-link span {
  color: var(--cyan);
  font-size: 1.35em;
  transition: transform .2s ease;
}

.version-link:hover span {
  transform: translateX(6px);
}

.current-version {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 3vw, 34px);
  margin: 46px auto 0;
  padding: 20px 28px;
  border: 1px solid rgba(255, 139, 31, .35);
  background: rgba(5, 18, 36, .7);
  font-family: var(--font-ui);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.current-version span {
  color: var(--muted);
}

.current-version strong {
  color: var(--cyan);
}

.current-version time {
  color: var(--orange);
}

.versions-footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 26px max(24px, calc((100vw - 1500px) / 2));
  border-top: 1px solid rgba(0, 231, 255, .2);
  color: var(--muted);
  font-size: .86rem;
}

.versions-footer a {
  color: var(--cyan);
  text-decoration: none;
}

@media (max-width: 900px) {
  .versions-page .header .hire-btn {
    display: none;
  }

  .version-grid {
    grid-template-columns: 1fr;
  }

  .current-version {
    width: 100%;
    max-width: 100%;
  }

  .version-content > p:not(.version-side) {
    min-height: 0;
  }
}

@media (max-width: 680px) {
  .versions-page .header {
    flex-wrap: wrap;
    gap: 16px;
  }

  .versions-page .nav {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid rgba(0, 231, 255, .16);
  }

  .versions-page .nav a {
    font-size: .68rem;
  }

  .versions-main {
    width: min(100% - 24px, 1500px);
    padding-top: 32px;
  }

  .versions-hero {
    margin-bottom: 28px;
    padding: 26px 20px 32px;
  }

  .versions-hero h1 {
    margin-bottom: 22px;
  }

  .current-version,
  .versions-footer {
    flex-direction: column;
    text-align: center;
  }
}

/* Keep the archive page aligned with the current portfolio theme. */
.versions-page .versions-main {
  width: min(var(--page-max-width, 1840px), calc(100% - 64px));
  padding: clamp(56px, 6vw, 92px) 0 clamp(64px, 7vw, 104px);
}

.versions-page .versions-hero {
  margin: 0;
  padding: clamp(42px, 4vw, 64px);
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(rgba(46, 103, 170, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46, 103, 170, .045) 1px, transparent 1px),
    radial-gradient(circle at 12% 18%, rgba(0, 153, 255, .14), transparent 30%),
    radial-gradient(circle at 88% 20%, rgba(255, 139, 31, .12), transparent 28%),
    linear-gradient(100deg, rgba(1, 11, 24, .9), rgba(18, 13, 15, .82));
  background-size: 42px 42px, 42px 42px, auto, auto, auto;
  box-shadow: inset 0 0 42px rgba(0, 153, 255, .06), inset -18px 0 42px rgba(255, 139, 31, .06);
}

.versions-page .versions-hero .section-label {
  gap: 10px;
  color: var(--color-cyan);
  font-family: var(--font-ui);
  font-size: var(--type-12, 14px);
  font-weight: 800;
  letter-spacing: var(--letter-spacing-ui, .08em);
}

.versions-page .versions-hero .section-label-icon {
  width: var(--icon-sm, 20px);
  height: var(--icon-sm, 20px);
}

.versions-page .versions-hero h1 {
  margin: 14px 0 22px;
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: var(--page-heading-size, clamp(42px, 3.7vw, 54px));
  font-weight: 900;
  line-height: var(--page-heading-line, 1.06);
  letter-spacing: var(--page-heading-letter, -.025em);
  text-transform: none;
}

.versions-page .versions-hero .section-description {
  max-width: 1120px;
  color: var(--professional-muted, var(--muted));
  font-family: var(--font-body);
  font-size: var(--type-16, 16px);
  font-weight: 500;
  line-height: 1.72;
}

.versions-page .version-grid {
  margin-top: clamp(38px, 4vw, 58px);
  gap: clamp(20px, 2vw, 32px);
}

.versions-page .version-card {
  border-radius: 0;
  background: linear-gradient(145deg, rgba(5, 18, 36, .96), rgba(2, 6, 18, .98));
  box-shadow: inset 0 0 28px rgba(0, 153, 255, .045);
}

.versions-page .version-content h2 {
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-weight: 900;
  letter-spacing: -.015em;
}

.versions-page .version-content > p:not(.version-side) {
  color: var(--professional-muted, var(--muted));
  font-family: var(--font-body);
  font-size: var(--type-16, 16px);
  font-weight: 500;
  line-height: 1.72;
}

.versions-page .version-link {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(100deg, #6490ff 0%, #315dff 38%, #ff9c28 72%, #ffd36c 100%);
  box-shadow: inset 0 0 16px rgba(255, 255, 255, .16), 0 0 12px rgba(84, 116, 255, .34), 0 0 12px rgba(255, 170, 48, .28);
  transition: transform .2s ease, filter .2s ease, box-shadow .2s ease;
}

.versions-page .version-link:hover,
.versions-page .version-link:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: inset 0 0 20px rgba(255, 255, 255, .22), 0 0 20px rgba(84, 116, 255, .52), 0 0 20px rgba(255, 170, 48, .44);
  outline: none;
}

.versions-page .version-link .iconify-ui-icon {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  opacity: 1 !important;
  visibility: visible !important;
  filter: brightness(0) saturate(100%) invert(91%) sepia(97%) saturate(1874%) hue-rotate(353deg) brightness(108%) contrast(106%) drop-shadow(0 0 6px rgba(255, 235, 30, .85)) !important;
}

.versions-page .current-version {
  margin-top: clamp(34px, 4vw, 52px);
  min-height: 72px;
  border-radius: 0;
  background: linear-gradient(90deg, rgba(4, 15, 32, .96), rgba(1, 7, 18, .98) 56%, rgba(31, 18, 8, .94));
}

.versions-page .versions-footer {
  width: min(var(--page-max-width, 1840px), calc(100% - 64px));
  margin-inline: auto;
  padding-inline: 0;
  font-family: var(--font-body);
  font-size: var(--type-16, 16px) !important;
  font-weight: 500;
  line-height: 1.6;
}

.versions-page .versions-footer p,
.versions-page .versions-footer a {
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
}

@media (max-width: 760px) {
  .versions-page .versions-main,
  .versions-page .versions-footer {
    width: calc(100% - 24px);
  }

  .versions-page .versions-main {
    padding-top: 32px;
  }

  .versions-page .versions-hero {
    padding: 30px 18px 36px;
  }

  .versions-page .versions-hero h1 {
    font-size: var(--type-32, 32px);
  }

  .versions-page .version-link {
    width: 100%;
    justify-content: space-between;
  }
}
