:root {
  color-scheme: light;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-muted: #eef6f4;
  --ink: #102033;
  --muted: #607086;
  --line: #d8e1eb;
  --blue: #2357d6;
  --blue-dark: #173b8f;
  --green: #0f8a6a;
  --green-soft: #def4ed;
  --shadow: 0 14px 32px rgba(20, 39, 63, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

body.homepage-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

a {
  color: inherit;
}

body.homepage-page main,
body.homepage-page .site-footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  flex: 0 0 auto;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1240px, calc(100% - 40px));
  min-height: 62px;
  margin: 0 auto;
}

body.homepage-page main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.brand-link,
.brand-text {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-logo {
  width: 76px;
  height: auto;
  flex: 0 0 auto;
}

.brand-logo-uoa {
  width: 90px;
}

.brand-divider {
  width: 1px;
  height: 24px;
  background: var(--line);
  flex: 0 0 auto;
}

.brand-text {
  min-width: 0;
  font-size: 0.96rem;
  font-weight: 760;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.brand-link:hover,
.brand-link:focus-visible,
.brand-text:hover,
.brand-text:focus-visible {
  outline: none;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 680;
  text-decoration: none;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  background: #eef2f7;
  color: var(--ink);
  outline: none;
}

.intro-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 360px);
  gap: 28px;
  align-items: center;
  min-height: 176px;
  padding: 18px 0 16px;
}

.intro-copy {
  max-width: 760px;
}

.eyebrow,
.card-kicker {
  margin: 0;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 12px;
  font-size: 2.32rem;
  line-height: 1.06;
  letter-spacing: 0;
}

.intro-text {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.project-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 124px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.project-mark img {
  display: block;
  width: min(100%, 270px);
  height: auto;
}

.project-mark__link {
  display: block;
  width: min(100%, 270px);
}

.project-mark__link img {
  width: 100%;
}

.platform-section {
  padding: 12px 0 12px;
}

.section-heading {
  margin-bottom: 12px;
}

.section-heading h2 {
  margin: 8px 0 0;
  font-size: 1.46rem;
  line-height: 1.18;
  letter-spacing: 0;
}

.platform-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  grid-template-rows: repeat(2, minmax(150px, auto));
  gap: 14px;
}

.platform-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  min-height: 150px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 26px rgba(20, 39, 63, 0.06);
  isolation: isolate;
  overflow: hidden;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease;
}

.platform-card::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  background:
    linear-gradient(135deg, rgba(15, 138, 106, 0.08), rgba(35, 87, 214, 0.04));
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.platform-card > * {
  position: relative;
  z-index: 1;
}

.platform-card-primary {
  grid-row: span 2;
  justify-content: flex-start;
  min-height: 314px;
  color: #ffffff;
  background: #12335f;
  border-color: #12335f;
  box-shadow: var(--shadow);
}

.platform-card-primary::before {
  background:
    radial-gradient(circle at 82% 16%, rgba(127, 226, 191, 0.28), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.13), transparent 38%);
  transform: translate3d(12px, -10px, 0);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.platform-card:hover,
.platform-card:focus-within {
  transform: translateY(-4px);
  border-color: #b2c6d6;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(20, 39, 63, 0.13);
}

.platform-card:hover::before,
.platform-card:focus-within::before {
  opacity: 1;
}

.platform-card-primary:hover,
.platform-card-primary:focus-within {
  border-color: #2760b8;
  background: #143b6d;
  box-shadow: 0 22px 46px rgba(18, 51, 95, 0.28);
}

.platform-card-primary:hover::before,
.platform-card-primary:focus-within::before {
  transform: translate3d(0, 0, 0);
}

.platform-card h3 {
  max-width: 700px;
  margin: 8px 0 10px;
  font-size: 1.08rem;
  line-height: 1.22;
  letter-spacing: 0;
}

.platform-card p:not(.card-kicker) {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.42;
}

.platform-card-primary h3 {
  font-size: 1.72rem;
  line-height: 1.12;
}

.platform-card-primary p:not(.card-kicker) {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.98rem;
}

.platform-card-primary .card-kicker {
  color: #7fe2bf;
}

.platform-action,
.platform-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  font-weight: 760;
  line-height: 1;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.platform-action {
  gap: 8px;
  margin-top: 10px;
  background: #ffffff;
  color: #12335f;
}

.platform-action:hover,
.platform-action:focus-visible {
  background: #dff5ee;
  outline: none;
}

.platform-card-primary:hover .platform-action,
.platform-card-primary:focus-within .platform-action {
  background: #e9fff7;
  transform: translateX(2px);
}

.platform-status {
  background: var(--green-soft);
  color: var(--green);
}

.platform-card:hover .platform-status,
.platform-card:focus-within .platform-status {
  background: #d4efe6;
  color: #0b6f55;
}

body.homepage-page .site-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

body.homepage-page .site-footer__meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

body.homepage-page .site-footer__separator {
  width: 1px;
  height: 16px;
  background: var(--line);
}

body.homepage-page .site-footer a {
  color: var(--blue-dark);
  font-weight: 700;
  text-decoration: none;
}

body.homepage-page .site-footer a:hover,
body.homepage-page .site-footer a:focus-visible {
  text-decoration: underline;
  outline: none;
}

@media (max-width: 900px) {
  .site-header__inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 10px 0;
  }

  .top-nav {
    justify-content: flex-start;
  }

  .intro-section {
    grid-template-columns: 1fr;
    padding-top: 14px;
  }

  h1 {
    font-size: 2rem;
  }

  .platform-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }

  .platform-card-primary {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 230px;
  }
}

@media (max-width: 620px) {
  body.homepage-page main,
  body.homepage-page .site-footer {
    width: min(100% - 28px, 1180px);
  }

  .site-header__inner {
    width: min(100% - 28px, 1240px);
  }

  .brand {
    align-items: center;
    gap: 8px;
  }

  .brand-divider {
    display: none;
  }

  .brand-logo {
    width: 58px;
  }

  .brand-logo-uoa {
    width: 70px;
  }

  .brand-text {
    max-width: 112px;
    font-size: 0.82rem;
  }

  .top-nav {
    display: none;
  }

  .site-header__inner {
    flex-direction: row;
    align-items: center;
    min-height: 54px;
    padding: 6px 0;
  }

  .intro-section {
    gap: 14px;
    min-height: auto;
    padding: 10px 0 8px;
  }

  h1 {
    margin-bottom: 8px;
    font-size: 1.55rem;
    line-height: 1.12;
  }

  .intro-text {
    font-size: 1rem;
    line-height: 1.5;
  }

  .project-mark {
    display: none;
  }

  .platform-section {
    padding: 8px 0 8px;
  }

  .section-heading {
    margin-bottom: 12px;
  }

  .section-heading h2 {
    font-size: 1.36rem;
  }

  .platform-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .platform-card,
  .platform-card-primary {
    min-height: auto;
    padding: 14px;
  }

  .platform-card-primary h3 {
    font-size: 1.18rem;
  }

  .platform-card h3 {
    margin: 6px 0 6px;
    font-size: 1rem;
  }

  .platform-card p:not(.card-kicker) {
    font-size: 0.84rem;
    line-height: 1.32;
  }

  .platform-card:not(.platform-card-primary) p:not(.card-kicker) {
    display: none;
  }

  .platform-action,
  .platform-status {
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.88rem;
  }

  body.homepage-page .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    padding: 8px 0 10px;
    font-size: 0.84rem;
  }
}
