@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@300..600&display=swap");

/* Final layout: Version 2 with the restrained AVELIS/Montserrat language. */
.version-two .cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.version-two .brand {
  display: block;
  margin-bottom: 30px;
}

.version-two .brand-logo {
  display: block;
  width: 106px;
  height: 72px;
  object-fit: contain;
  object-position: left center;
  filter: grayscale(1) invert(1) brightness(1.65) opacity(0.86);
}

.version-two .system-card {
  min-height: 276px;
}

/* Prepress, color and packaging form one warm workflow strand. */
.version-two .accent-orange,
.version-two .accent-blue,
.version-two .accent-green {
  --accent: #bd8850;
}

/* IT, AI and smart systems form one cool infrastructure strand. */
.version-two .accent-cyan,
.version-two .accent-purple,
.version-two .accent-amber {
  --accent: #5b94b6;
}

.version-two .category-art {
  opacity: 0.8;
}

.version-two .category-art img {
  filter: saturate(0.62) contrast(1.01) brightness(0.9);
}

.version-two .system-card::before {
  opacity: 0.58;
}

.version-two .system-card .card-content::after {
  opacity: 0.42;
}

.version-two .card-icon {
  filter: drop-shadow(0 0 7px color-mix(in srgb, var(--accent) 36%, transparent));
}

.version-two .card-link {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
}

.version-two .card-link:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 85%, white);
  outline-offset: -3px;
}

.version-two .system-card:has(.card-link:hover),
.version-two .system-card:has(.card-link:focus-visible) {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 56%, white);
}

/* Tablets in portrait use one spacious card at a time. */
@media (max-width: 1024px) and (orientation: portrait) {
  .version-two .cards {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .version-two .system-card {
    min-height: 300px;
  }

  .version-two .card-content {
    max-width: 56%;
    padding-right: 18px;
  }

  .version-two .system-card .category-art {
    inset: 0 0 0 39%;
  }

  .version-two .category-art::after {
    background: linear-gradient(90deg, rgba(6, 10, 16, 0.12) 0%, rgba(6, 10, 16, 0.04) 48%, transparent 100%);
  }
}

/* Phones retain the same full-card image atmosphere as the desktop layout. */
@media (max-width: 680px) {
  .version-two .cards {
    gap: 16px;
  }

  .version-two .system-card {
    display: block;
    min-height: clamp(300px, 58vw, 350px);
    background: linear-gradient(145deg, rgba(15, 21, 30, 0.72), rgba(5, 9, 15, 0.58));
  }

  .version-two .card-content {
    max-width: 78%;
    padding: 20px;
  }

  .version-two .system-card .category-art {
    position: absolute;
    inset: 0;
    width: auto;
    height: auto;
    margin: 0;
    transform: none;
    opacity: 0.84;
  }

  .version-two .category-art img {
    object-position: 72% center;
    transform: none;
    filter: saturate(0.66) contrast(1.04) brightness(0.88);
  }

  .version-two .system-card:nth-child(1) .category-art img,
  .version-two .system-card:nth-child(3) .category-art img {
    object-position: right center;
  }

  .version-two .system-card:nth-child(4) .category-art img {
    object-position: 68% 58%;
  }

  .version-two .system-card:nth-child(5) .category-art img {
    object-position: 72% 38%;
  }

  .version-two .category-art::after {
    background: linear-gradient(90deg, rgba(6, 10, 16, 0.9) 0%, rgba(6, 10, 16, 0.77) 51%, rgba(6, 10, 16, 0.18) 100%);
  }
}

/* A phone held sideways retains the compact split layout. */
@media (max-width: 920px) and (max-height: 560px) and (orientation: landscape) {
  .version-two .cards {
    grid-template-columns: 1fr;
  }

  .version-two .system-card {
    min-height: 250px;
  }

  .version-two .card-content {
    max-width: 56%;
    padding-right: 18px;
  }

  .version-two .system-card .category-art {
    inset: 0 0 0 42%;
  }
}

:root {
  --bg: #070c11;
  --panel: rgba(11, 18, 25, 0.84);
  --panel-strong: rgba(7, 12, 17, 0.92);
  --line: rgba(34, 48, 59, 0.92);
  --line-hot: rgba(88, 101, 112, 0.78);
  --text: #edf1f5;
  --muted: #a5b1bd;
  --quiet: #8997a4;
  --orange: #d6a044;
  --amber: #d6a044;
  --blue: #55b7c5;
  --cyan: #55b7c5;
  --green: #d6a044;
  --purple: #8f79db;
  --radius: 16px;
  --shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
  --copy-weight: 350;
  --type-copy-small: clamp(0.78rem, calc(0.75rem + 0.035vw), 0.84rem);
  --type-copy: clamp(0.94rem, calc(0.91rem + 0.035vw), 0.99rem);
  --type-copy-large: clamp(1rem, calc(0.96rem + 0.05vw), 1.08rem);
  --type-section-title: clamp(1.55rem, calc(1.2rem + 0.6vw), 2.1rem);
  font-family: "Montserrat", "Segoe UI", Arial, sans-serif;
}

.final-site,
.final-site button,
.final-site input,
.final-site textarea,
.final-site select,
.final-site h1,
.final-site h2,
.final-site .brand strong,
.final-site .kicker,
.final-site .subtitle,
.final-site .top-fact,
.final-site .nav a,
.final-site .system-card p,
.final-site .overview h2,
.final-site .bottom-grid h2,
.final-site .milestone-list strong,
.final-site .portrait-placeholder span {
  font-family: "Montserrat", "Segoe UI", Arial, sans-serif;
}

.final-site {
  color: var(--text);
  font-weight: var(--copy-weight);
  background:
    linear-gradient(90deg, rgba(7, 12, 17, 0.2), transparent 42%, rgba(7, 12, 17, 0.2)),
    url("assets/nexus-technical-background-2k.webp") 54% center / cover fixed no-repeat,
    var(--bg);
}

.final-site .ambient {
  opacity: 0.52;
  background-size: 72px 72px;
}

.final-site .glass-panel,
.final-site .system-card {
  background: rgba(11, 18, 25, 0.76);
  border-color: var(--line);
  box-shadow: inset 0 1px 0 rgba(237, 241, 245, 0.025), var(--shadow);
  backdrop-filter: blur(16px) saturate(104%);
  -webkit-backdrop-filter: blur(16px) saturate(104%);
}

.final-site .sidebar,
.final-site .overview,
.final-site .bottom-grid > .glass-panel,
.final-site .profile-detail,
.final-site .career-detail {
  background: rgba(7, 12, 17, 0.72);
  border-color: var(--line);
  box-shadow: inset 0 1px 0 rgba(237, 241, 245, 0.025), 0 16px 42px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(14px) saturate(102%);
  -webkit-backdrop-filter: blur(14px) saturate(102%);
}

.final-site h1 {
  color: var(--text);
  font-weight: 300;
  letter-spacing: 0.12em;
  text-shadow: none;
}

.final-site .hero-name-word {
  display: inline-block;
  font-family: "Montserrat", "Segoe UI", Arial, sans-serif;
  font-size: 1em;
  font-weight: 300;
  line-height: inherit;
  letter-spacing: inherit;
  white-space: nowrap;
}

.final-site .avelis-a {
  display: inline-block;
  width: 0.72em;
  height: 0.72em;
  margin-right: 0.065em;
  object-fit: fill;
  vertical-align: -0.01em;
}

.final-site h2,
.final-site .system-card h2,
.final-site .overview h2,
.final-site .bottom-grid h2,
.final-site .story-heading h2 {
  font-weight: 350;
  letter-spacing: 0.1em;
}

.final-site .subtitle,
.final-site .kicker,
.final-site .story-kicker,
.final-site .page-topline,
.final-site .top-fact {
  font-weight: 400;
  letter-spacing: 0.18em;
}

.final-site .nav a {
  border-radius: 8px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.1em;
}

.final-site .nav a:hover,
.final-site .nav a.active {
  color: var(--text);
  border-color: var(--line-hot);
  background: rgba(237, 241, 245, 0.035);
}

.final-site .brand {
  display: block;
  margin-bottom: 30px;
}

.final-site .brand-logo {
  display: block;
  width: 106px;
  height: 72px;
  object-fit: contain;
  object-position: left center;
  filter: grayscale(1) invert(1) brightness(1.35) opacity(0.78);
}

.final-site .system-card::before {
  background: linear-gradient(110deg, color-mix(in srgb, var(--accent), transparent 94%), transparent 55%);
  opacity: 0.46;
}

.final-site .system-card::after {
  opacity: 0.2;
}

.final-site .system-card .card-content::after {
  opacity: 0.26;
  filter: none;
}

.final-site .card-icon,
.final-site .card-icon::before,
.final-site .metric-grid span::before,
.final-site .milestone-list li::before {
  filter: none;
  box-shadow: none;
}

.final-site .system-card h2 {
  font-size: 1rem;
}

.final-site .system-card p,
.final-site .metric-grid small,
.final-site .focus-row span,
.final-site .focus-row b {
  font-weight: 500;
  letter-spacing: 0.13em;
}

.final-site .system-card ul,
.final-site .story-columns p,
.final-site .career-intro,
.final-site .profile-note,
.final-site .career-close,
.final-site .page-lead {
  font-weight: var(--copy-weight);
}

.final-site .page-lead {
  font-size: var(--type-copy-large);
  line-height: 1.68;
}

.final-site .story-columns p,
.final-site .career-intro,
.final-site .profile-note,
.final-site .career-close,
.final-site .project-philosophy-copy > p:last-child,
.final-site .project-summary {
  font-size: var(--type-copy);
  line-height: 1.68;
}

.final-site .milestone-list span,
.final-site .project-philosophy-grid p,
.final-site .project-traits,
.final-site .system-card ul {
  font-size: var(--type-copy-small);
  line-height: 1.55;
}

.final-site .metric-grid div {
  border-radius: 8px;
  background: rgba(237, 241, 245, 0.025);
}

.final-site .metric-grid strong,
.final-site .clock strong {
  font-weight: 400;
}

.final-site .ghost-button,
.final-site .primary-button {
  border-radius: 6px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.final-site .system-card:hover,
.final-site .system-card:has(.card-link:hover),
.final-site .system-card:has(.card-link:focus-visible) {
  transform: translateY(-2px);
  border-color: var(--line-hot);
}

.final-site .portrait-placeholder {
  border-color: var(--line-hot);
  background: rgba(11, 18, 25, 0.72);
  box-shadow: inset 0 1px 0 rgba(237, 241, 245, 0.025);
}

.final-site .milestone-list li {
  border-left-color: var(--line-hot);
}

.final-site .milestone-list li::before {
  background: var(--blue);
}

.final-site .projects-intro {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 56px;
  align-items: end;
  min-height: 210px;
  padding: 34px 40px;
  border-radius: var(--radius);
  background: rgba(7, 12, 17, 0.68);
  border-color: var(--line);
  box-shadow: inset 0 1px 0 rgba(237, 241, 245, 0.025), 0 16px 42px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(14px) saturate(102%);
  -webkit-backdrop-filter: blur(14px) saturate(102%);
}

.final-site .projects-intro h1 {
  margin: 0;
  max-width: 15ch;
  font-size: clamp(2rem, 2.8vw, 3.15rem);
  line-height: 1.12;
  text-transform: uppercase;
  overflow-wrap: normal;
  word-break: normal;
}

.final-site .projects-intro .keep-word {
  white-space: nowrap;
}

.final-site .projects-intro .page-lead {
  margin: 0;
}

.final-site .projects-intro-copy {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.final-site .project-philosophy {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 38px;
  margin-top: 18px;
  padding: 28px 32px;
  border-radius: var(--radius);
  background: rgba(7, 12, 17, 0.72);
  border-color: var(--line);
  box-shadow: inset 0 1px 0 rgba(237, 241, 245, 0.025), 0 16px 42px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px) saturate(102%);
  -webkit-backdrop-filter: blur(14px) saturate(102%);
}

.final-site .project-philosophy h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 350;
  line-height: 1.25;
}

.final-site .project-philosophy-copy > p:last-child {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: var(--copy-weight);
  line-height: 1.7;
}

.final-site .project-philosophy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(3, 8, 13, 0.44);
}

.final-site .project-philosophy-grid article {
  min-width: 0;
  padding: 18px;
}

.final-site .project-philosophy-grid article + article {
  border-left: 1px solid var(--line);
}

.final-site .project-philosophy-grid span {
  color: var(--orange);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.final-site .project-philosophy-grid h3 {
  margin: 10px 0 7px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 450;
  line-height: 1.35;
}

.final-site .project-philosophy-grid p {
  margin: 0;
  color: var(--quiet);
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.55;
}

.final-site .project-family {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.final-site .project-card {
  --project-accent: var(--orange);
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 420px;
  overflow: hidden;
  padding: 20px 24px;
  border-radius: var(--radius);
  background: rgba(7, 12, 17, 0.72);
  border-color: var(--line);
  box-shadow: inset 0 1px 0 rgba(237, 241, 245, 0.025), 0 16px 42px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(14px) saturate(102%);
  -webkit-backdrop-filter: blur(14px) saturate(102%);
}

.final-site .project-card::before,
.final-site .project-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.final-site .project-card {
  color: inherit;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.final-site .project-card:hover,
.final-site .project-card:focus-visible {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--project-accent), transparent 56%);
  background-color: rgba(9, 16, 23, 0.78);
  box-shadow: inset 0 1px 0 rgba(237, 241, 245, 0.04), 0 22px 54px rgba(0, 0, 0, 0.28);
  outline: none;
}

.final-site .project-card::before {
  inset: 50px 24px auto;
  height: 1px;
  background: linear-gradient(90deg, var(--project-accent), rgba(237, 241, 245, 0.08) 28%, rgba(237, 241, 245, 0.04));
  opacity: 0.62;
}

.final-site .project-card::after {
  display: none;
}

.final-site .project-avelis { --project-accent: #d6a044; }
.final-site .project-calyra { --project-accent: #8c7be8; }
.final-site .project-imetra { --project-accent: #58cfd8; }
.final-site .project-vestra { --project-accent: #e38a2b; }
.final-site .project-nexum {
  --project-accent: #46a78f;
  grid-column: auto;
}

.final-site .project-card header,
.final-site .project-card footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  text-transform: uppercase;
}

.final-site .project-card header span {
  color: var(--project-accent);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
}

.final-site .project-card header small,
.final-site .project-card footer {
  color: var(--quiet);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.18em;
}

.final-site .project-card-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  align-self: stretch;
  min-width: 0;
  width: 100%;
  padding: 18px 0 16px;
}

.final-site .project-logo-stage {
  display: grid;
  place-items: center;
  width: min(100%, 520px);
  height: 132px;
  margin: 0 auto 12px;
}

.final-site .project-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.final-site .project-summary {
  max-width: 66ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.6;
}

.final-site .project-traits {
  display: grid;
  gap: 5px;
  margin: 12px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
  list-style: none;
}

.final-site .project-traits li {
  position: relative;
  padding-left: 16px;
}

.final-site .project-traits li::before {
  content: "";
  position: absolute;
  top: 0.56em;
  left: 0;
  width: 5px;
  height: 5px;
  border: 1px solid var(--project-accent);
  transform: rotate(45deg);
  opacity: 0.86;
}

.final-site .project-nexum .project-card-body {
  max-width: 760px;
  margin-inline: auto;
}

.final-site .project-card footer {
  padding-top: 12px;
  border-top: 1px solid rgba(237, 241, 245, 0.06);
}

.final-site .project-card footer strong {
  color: color-mix(in srgb, var(--project-accent), var(--text) 18%);
  font-weight: 500;
  text-align: right;
}

.final-site .project-disclaimer {
  margin: 18px 0 0;
  padding: 18px 4px 2px;
  color: var(--quiet);
  font-size: 0.72rem;
  line-height: 1.6;
  letter-spacing: 0.06em;
}

/* These links currently lead back to the overview and stay out of the navigation. */
.final-site .nav a[data-icon="star"],
.final-site .nav a[data-icon="spark"],
.final-site .nav a[data-icon="mail"] {
  display: none;
}

@media (max-width: 1024px) and (orientation: portrait) {
  .final-site .nav {
    flex-wrap: wrap;
    overflow-x: visible;
    gap: 7px;
  }

  .final-site .nav a {
    min-width: 0;
    flex: 1 1 132px;
    grid-template-columns: 20px minmax(0, 1fr);
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
  }

  .final-site .page-topline,
  .final-site .detail-project-nav {
    min-width: 0;
  }

  .final-site :is(h1, h2, h3, p, a, small, span, strong, li) {
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: normal;
  }

  .final-site .subtitle,
  .final-site .story-kicker,
  .final-site .page-topline,
  .final-site .detail-project-nav a {
    letter-spacing: 0.06em;
  }
}

@media (max-width: 520px) {
  .final-site .nav a {
    flex-basis: 100%;
  }

  .version-two .card-content,
  .version-two .system-card h2,
  .version-two .system-card p {
    min-width: 0;
    overflow-wrap: break-word;
    word-break: normal;
  }
}

@media (max-width: 900px) {
  .final-site .projects-intro,
  .final-site .project-family,
  .final-site .project-philosophy {
    grid-template-columns: 1fr;
  }

  .final-site .project-philosophy {
    gap: 24px;
  }

  .final-site .project-nexum {
    grid-column: auto;
  }

  .final-site .projects-intro {
    gap: 24px;
    min-height: 0;
  }

  .final-site .projects-intro h1 {
    max-width: none;
  }
}

@media (max-width: 520px) {
  .final-site .projects-page {
    padding: 16px;
  }

  .final-site .projects-intro {
    padding: 26px 22px;
  }

  .final-site .project-philosophy {
    margin-top: 14px;
    padding: 22px;
  }

  .final-site .project-philosophy-grid {
    grid-template-columns: 1fr;
  }

  .final-site .project-philosophy-grid article + article {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .final-site .projects-intro h1 {
    font-size: clamp(1.55rem, 7.2vw, 2.1rem);
    line-height: 1.16;
  }

  .final-site .project-family {
    gap: 14px;
    margin-top: 14px;
  }

  .final-site .project-card {
    min-height: 0;
    padding: 20px;
  }

  .final-site .project-card::before {
    inset: 50px 20px auto;
  }

  .final-site .project-card-body {
    padding: 24px 0 22px;
  }

  .final-site .project-logo-stage {
    width: min(100%, 390px);
    height: 104px;
    margin-bottom: 16px;
  }

  .final-site .project-card header small {
    max-width: 62%;
    text-align: right;
  }

  .final-site .project-card footer {
    align-items: flex-start;
  }

  .final-site .project-card footer strong {
    max-width: 66%;
  }
}

@media (max-width: 680px) {
  .final-site h1 {
    letter-spacing: 0.08em;
  }

  .final-site .system-card h2 {
    letter-spacing: 0.06em;
  }
}

/* Keep the category artwork full-bleed when a phone or tablet is rotated. */
@media (max-width: 1280px) and (max-height: 900px) and (orientation: landscape) {
  .final-site.version-two .system-card .category-art {
    position: absolute;
    inset: 0;
    width: auto;
    height: auto;
    margin: 0;
    transform: none;
  }

  .final-site.version-two .category-art img {
    width: 100%;
    height: 100%;
    transform: none;
    object-fit: cover;
    object-position: center;
  }
}

/* September 2026: readable secondary copy, expanded project family and keyboard access. */
.final-site .project-printtool { --project-accent: #75c6bb; }
.final-site .project-calyra-voice-satellite { --project-accent: #ac9df6; }
.final-site .project-dms { --project-accent: #d6bd82; }
.final-site .project-wordmark {
  max-width: 100%;
  color: var(--text);
  font-size: clamp(1.25rem, 2.3vw, 2rem);
  font-weight: 400;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-align: center;
  text-transform: uppercase;
}
.final-site .project-philosophy-grid p {
  font-size: var(--type-copy-small);
}
.final-site .project-card:focus-visible,
.final-site a:focus-visible,
.final-site button:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}
.final-site .skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 100;
  padding: 12px 18px;
  color: #070c11;
  background: #edf1f5;
  border-radius: 6px;
  transform: translateY(-180%);
}
.final-site .skip-link:focus { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .final-site *, .final-site *::before, .final-site *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (prefers-contrast: more) {
  :root { --muted: #d3dbe2; --quiet: #bcc6cf; }
  .final-site .glass-panel,
  .final-site .system-card { background-color: #0b1219; }
}
