:root {
  --deep-space-blue: #01030d;
  --electron-green: #c9d61d;
  --text-main: #f5f7ff;
  --text-muted: rgba(245, 247, 255, 0.76);
  --line-soft: rgba(255, 255, 255, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--deep-space-blue);
  color: var(--text-main);
  font-family: "Bai Jamjuree", "Segoe UI", sans-serif;
}

a {
  text-decoration: none;
  color: inherit;
}

button,
input {
  font: inherit;
}

.is-hidden {
  display: none !important;
}

.portfolio-shell {
  min-height: 100vh;
}

.portfolio-stage {
  position: relative;
  height: 280vh;
}

.portfolio-stage__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.portfolio-stage__video-layer,
.portfolio-stage__case-layer {
  position: absolute;
  inset: 0;
}

.portfolio-stage__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio-stage__video-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(1, 3, 13, 0.34), rgba(1, 3, 13, 0.5)),
    linear-gradient(90deg, rgba(1, 3, 13, 0.94) 0%, rgba(1, 3, 13, 0.88) 34%, rgba(1, 3, 13, 0.62) 56%, rgba(1, 3, 13, 0.28) 78%, rgba(1, 3, 13, 0.1) 100%);
}

.portfolio-topbar {
  position: absolute;
  top: 42px;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: flex-start;
  padding: 0 clamp(110px, 12vw, 220px);
}

.portfolio-brand img {
  display: block;
  width: min(180px, 28vw);
  height: auto;
}

.portfolio-stage__hero-copy {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 22px;
  align-content: center;
  min-height: 100vh;
  max-width: 1160px;
  padding: 132px clamp(110px, 12vw, 220px) 86px;
}

.portfolio-eyebrow {
  margin: 0;
  color: var(--electron-green);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.portfolio-stage__hero-copy h1 {
  margin: 0;
  max-width: 24ch;
  font-size: clamp(1.9rem, 3vw, 3.35rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
}

.portfolio-stage__hero-text {
  margin: 0;
  max-width: 64ch;
  color: var(--text-muted);
  font-size: 1.08rem;
  line-height: 1.85;
}

.portfolio-stage__hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.portfolio-primary-button,
.portfolio-secondary-button,
.modal__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 26px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
}

.portfolio-primary-button,
.modal__submit {
  border: 1px solid transparent;
  background: var(--electron-green);
  color: #02030f;
}

.portfolio-secondary-button {
  border: 2px solid rgba(201, 214, 29, 0.9);
  background: transparent;
  color: var(--electron-green);
}

.portfolio-stage__video-toggle {
  position: absolute;
  right: clamp(20px, 4vw, 48px);
  bottom: 26px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(3, 6, 28, 0.52);
  cursor: pointer;
}

.portfolio-stage__video-toggle-icon--play {
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid var(--text-main);
}

.portfolio-stage__video-toggle-icon--pause {
  position: relative;
  width: 14px;
  height: 18px;
}

.portfolio-stage__video-toggle-icon--pause::before,
.portfolio-stage__video-toggle-icon--pause::after {
  content: "";
  position: absolute;
  top: 0;
  width: 4px;
  height: 18px;
  background: var(--text-main);
}

.portfolio-stage__video-toggle-icon--pause::before {
  left: 1px;
}

.portfolio-stage__video-toggle-icon--pause::after {
  right: 1px;
}

.portfolio-stage__case-layer {
  z-index: 3;
  background:
    radial-gradient(circle at top right, rgba(201, 214, 29, 0.08), transparent 24%),
    linear-gradient(180deg, var(--deep-space-blue) 0%, var(--deep-space-blue) 100%);
}

.portfolio-stage__case-inner {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 100%;
  padding: 128px clamp(20px, 4vw, 48px) 64px;
}

.portfolio-stage__case-label {
  margin: 0 0 26px;
  width: min(100%, 1100px);
  color: var(--electron-green);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: left;
}

.portfolio-project-card {
  position: relative;
  width: min(100%, 1100px);
  background: rgba(10, 18, 41, 0.9);
  box-shadow:
    0 34px 80px rgba(0, 0, 0, 0.42),
    0 14px 28px rgba(0, 0, 0, 0.24),
    0 0 0 1px rgba(255, 255, 255, 0.12);
  transform: perspective(1600px) rotateX(2deg);
}

.portfolio-project-card__image-wrap {
  position: relative;
  min-height: 380px;
  overflow: hidden;
}

.portfolio-project-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio-project-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(3, 6, 28, 0.96) 0%, rgba(3, 6, 28, 0.9) 20%, rgba(3, 6, 28, 0.76) 36%, rgba(3, 6, 28, 0.48) 56%, rgba(3, 6, 28, 0.18) 78%, rgba(3, 6, 28, 0.04) 100%),
    linear-gradient(180deg, rgba(3, 6, 28, 0.08), rgba(3, 6, 28, 0.14));
}

.portfolio-project-card__meta {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 2;
  display: grid;
  align-content: center;
  gap: 22px;
  width: min(38%, 380px);
  padding: 36px 32px 36px 40px;
}

.portfolio-project-card__meta-item {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}

.portfolio-project-card__meta-item span {
  display: block;
  margin-bottom: 10px;
  color: rgba(245, 247, 255, 0.62);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.portfolio-project-card__meta-item strong {
  display: block;
  color: var(--text-main);
  font-size: 1.28rem;
  line-height: 1.45;
}

.portfolio-project-card__cta {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  background: var(--electron-green);
  color: #02030f;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.portfolio-footer,
.ssd-footer {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(260px, 0.7fr);
  gap: 56px;
  max-width: 1280px;
  margin: 0 auto;
  border-top: 3px solid rgba(255, 255, 255, 0.16);
}

.portfolio-footer {
  padding: 72px clamp(20px, 4vw, 48px) 32px;
}

.ssd-footer {
  padding: 56px 32px 28px;
}

.portfolio-footer__brand-block,
.portfolio-footer__column,
.ssd-footer__brand,
.ssd-footer__contact {
  display: grid;
  gap: 10px;
}

.portfolio-footer__brand-block img {
  width: min(150px, 34vw);
  filter: brightness(0) invert(1);
}

.portfolio-footer__address,
.ssd-footer__brand,
.ssd-footer__contact {
  gap: 6px;
}

.portfolio-footer__address p,
.portfolio-footer__column p,
.portfolio-footer__column a,
.ssd-footer__brand p,
.ssd-footer__contact p,
.ssd-footer__contact a {
  margin: 0;
  color: rgba(245, 247, 255, 0.82);
  font-size: 0.95rem;
  line-height: 1.5;
}

.portfolio-footer__column h3,
.ssd-footer__contact h3 {
  margin: 0 0 10px;
  font-size: 1.45rem;
  font-weight: 700;
  text-transform: uppercase;
}

.ssd-page {
  min-height: 100vh;
  background: #01030d;
  color: #fff;
}

.ssd-container {
  max-width: 1152px;
  margin: 0 auto;
  padding: 32px 32px 48px;
}

.ssd-back-link {
  display: inline-flex;
  margin-bottom: 40px;
  color: #c9d61d;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ssd-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 52px;
}

.ssd-header h1 {
  margin: 0;
  color: #c9d61d;
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  line-height: 0.98;
  font-weight: 700;
}

.ssd-header__cta,
.ssd-benefits-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #c9d61d;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.ssd-summary-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.ssd-summary-card {
  padding: 20px 18px;
  background: #111121;
}

.ssd-summary-card span {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ssd-summary-card span::before {
  content: "";
  width: 8px;
  height: 8px;
  background: #c9d61d;
}

.ssd-summary-card strong {
  display: block;
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.6;
  font-weight: 400;
}

/* Funding section */

.ssd-funding {
  width: 100%;
  margin-bottom: 80px;
}

.ssd-funding__text {
  margin: 0 0 24px;
  color: #fff;
  font-size: 1rem;
  line-height: 1.55;
}

.ssd-funding__logos {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  align-items: center;
  width: 100%;
}

.ssd-funding__logos img {
  display: block;
  width: 100%;
  height: 88px;
  padding: 8px 10px;
  background: #fff;
  object-fit: contain;
}

.ssd-unified-analysis {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  column-gap: 32px;
  align-items: start;
  margin-bottom: 80px;
}

.ssd-unified-analysis__legend {
  grid-column: 1 / -1;
  margin-top: 20px;
}

.ssd-analysis-switch {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  background: #111121;
  isolation: isolate;
}

.ssd-analysis-switch__btn {
  position: relative;
  z-index: 1;
  padding: 10px 16px;
  border: 0;
  background: transparent;
  color: #c9d61d;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.ssd-analysis-switch__btn.is-active {
  color: #000;
}

.ssd-analysis-switch::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: calc(50% - 4px);
  background: #c9d61d;
  transition: transform 0.22s ease;
}

.ssd-analysis-switch--environmental::before {
  transform: translateX(0);
}

.ssd-analysis-switch--infrastructure::before {
  transform: translateX(100%);
}

.ssd-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ssd-btns--spaced {
  margin-top: 32px;
}

.ssd-btn {
  padding: 8px 16px;
  border: 1px solid #c9d61d;
  background: transparent;
  color: #c9d61d;
  font-size: 12px;
  cursor: pointer;
}

.ssd-btn.is-active,
.ssd-btn:hover {
  background: #c9d61d;
  color: #000;
}

.ssd-map {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: #1f2937;
}

.ssd-figure-label {
  font-size: 12px;
  line-height: 1.4;
  margin: 8px 0 0;
}

.ssd-legend-box,
.ssd-benefits-card {
  background: #111121;
}

.ssd-legend-box {
  padding: 20px 18px;
}

.ssd-legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.ssd-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ssd-swatch {
  width: 40px;
  height: 16px;
  border: 1px solid #374151;
}

.ssd-text-sections {
  display: grid;
  gap: 48px;
  margin-bottom: 64px;
}

.ssd-text-block {
  display: grid;
  gap: 16px;
}

.ssd-section-title,
.ssd-benefits-card__title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}

.ssd-body {
  font-size: 20px;
  line-height: 1.65;
}

.ssd-body p {
  margin: 0 0 16px;
}

.ssd-read-more {
  padding: 0;
  border: 0;
  background: transparent;
  color: #c9d61d;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.ssd-read-more--inline {
  margin-left: 8px;
}

.ssd-benefits-card {
  display: grid;
  gap: 28px;
  padding: 24px 24px 20px;
}

.ssd-arrow {
  position: relative;
  display: inline-block;
  width: 22px;
  height: 12px;
}

.ssd-arrow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 4px;
  height: 2px;
  background: currentColor;
  transform: translateY(-50%);
}

.ssd-arrow::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 6, 28, 0.68);
  backdrop-filter: blur(10px);
}

.modal__card {
  position: relative;
  width: min(100%, 560px);
  padding: 32px 28px 28px;
  background:
    linear-gradient(180deg, rgba(201, 214, 29, 0.06), rgba(201, 214, 29, 0) 28%),
    #01030d;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.12);
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: rgba(245, 247, 255, 0.72);
  font-size: 1.8rem;
  cursor: pointer;
}

.modal__eyebrow {
  margin: 0 0 10px;
  color: #c9d61d;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.modal__title {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 2.6rem);
  line-height: 1;
}

.modal__text {
  margin: 0 0 22px;
  color: rgba(245, 247, 255, 0.82);
  line-height: 1.7;
}

.modal__list,
.modal__form {
  display: grid;
  gap: 14px;
}

.modal__item {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.modal__item strong {
  display: block;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.modal__item p {
  margin: 0;
  color: rgba(245, 247, 255, 0.82);
}

.modal__field {
  display: grid;
  gap: 8px;
}

.modal__field span {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 247, 255, 0.82);
}

.modal__field input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #0a1022;
  color: #fff;
}

.modal__field input:focus {
  outline: none;
  border-color: #c9d61d;
}

@media (max-width: 1100px) {
  .ssd-summary-cards,
  .ssd-unified-analysis,
  .portfolio-footer,
  .ssd-footer {
    grid-template-columns: 1fr;
  }

  .ssd-funding__logos {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
  }

  .ssd-funding__logos img {
    height: 76px;
    padding: 6px 8px;
  }

  .ssd-analysis-switch {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .portfolio-topbar {
    top: 28px;
    padding: 0 28px;
  }

  .portfolio-brand img {
    width: min(150px, 48vw);
  }

  .portfolio-stage__hero-copy {
    max-width: 100%;
    align-content: end;
    padding: 150px 28px 82px;
  }

  .portfolio-stage__hero-copy h1 {
    font-size: clamp(2.35rem, 10vw, 3.9rem);
  }

  .portfolio-stage__hero-text {
    font-size: 1rem;
    line-height: 1.75;
  }

  .portfolio-primary-button,
  .portfolio-secondary-button {
    width: 100%;
  }

  .portfolio-stage__hero-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .portfolio-stage__video-toggle {
    right: 16px;
    bottom: 16px;
  }

  .portfolio-stage__case-inner {
    padding: 114px 16px 40px;
  }

  .portfolio-project-card {
    transform: none;
  }

  .portfolio-project-card__body,
  .portfolio-project-card__image-wrap {
    display: flex;
    flex-direction: column;
  }

  .portfolio-project-card__image-wrap {
    min-height: 0;
  }

  .portfolio-project-card__image {
    aspect-ratio: 16/10;
    height: auto;
  }

  .portfolio-project-card__overlay {
    background:
      linear-gradient(180deg, rgba(3, 6, 28, 0.52) 0%, rgba(3, 6, 28, 0.08) 38%, rgba(3, 6, 28, 0) 100%),
      linear-gradient(180deg, rgba(3, 6, 28, 0.08), rgba(3, 6, 28, 0.14));
  }

  .portfolio-project-card__meta {
    position: relative;
    top: auto;
    left: auto;
    bottom: auto;
    width: 100%;
    gap: 18px;
    padding: 22px 20px 0;
    background: linear-gradient(180deg, rgba(3, 6, 28, 0.98), rgba(3, 6, 28, 0.94));
  }

  .portfolio-project-card__meta-item {
    padding-bottom: 16px;
  }

  .portfolio-project-card__meta-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .portfolio-project-card__meta-item strong {
    font-size: 1.1rem;
    line-height: 1.35;
  }

  .portfolio-project-card__cta {
    position: relative;
    right: auto;
    bottom: auto;
    align-self: stretch;
    margin: 18px 20px 20px;
    width: calc(100% - 40px);
    min-height: 50px;
    padding: 0 18px;
    font-size: 0.92rem;
  }

  .portfolio-footer,
  .ssd-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .ssd-container {
    padding: 32px 20px;
  }

  .ssd-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .ssd-header h1 {
    font-size: clamp(2.3rem, 12vw, 3.5rem);
  }

  .ssd-funding {
    margin-bottom: 56px;
  }

  .ssd-funding__text {
    font-size: 0.95rem;
  }

  .ssd-funding__logos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .ssd-funding__logos img {
    height: 82px;
  }

  .ssd-body {
    font-size: 18px;
  }

  .modal {
    padding: 16px;
  }

  .modal__card {
    padding: 28px 20px 22px;
  }
}
/* all your existing CSS above */

/* Home page funding logos */

.portfolio-funding {
  width: min(100%, 760px);
  margin-top: 8px;
}

.portfolio-funding__text {
  margin: 0 0 14px;
  max-width: 72ch;
  color: rgba(245, 247, 255, 0.82);
  font-size: 0.82rem;
  line-height: 1.45;
}

.portfolio-funding__logos {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
  width: 100%;
}

.portfolio-funding__logos img {
  display: block;
  width: 100%;
  height: 58px;
  padding: 6px 8px;
  background: #ffffff;
  object-fit: contain;
}

@media (max-width: 720px) {
  .portfolio-funding {
    width: 100%;
  }

  .portfolio-funding__text {
    font-size: 0.75rem;
  }

  .portfolio-funding__logos {
    grid-template-columns: repeat(5, minmax(70px, 1fr));
    gap: 6px;
    overflow-x: auto;
  }

  .portfolio-funding__logos img {
    height: 50px;
    min-width: 70px;
  }
}