:root {
  color: #0d1932;
  background: #eef4fb;
  font-family:
    Inter,
    "Microsoft YaHei",
    "Segoe UI",
    system-ui,
    sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
}

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

.portal-shell {
  align-items: stretch;
  background:
    linear-gradient(100deg, rgba(238, 244, 251, 0.98) 0%, rgba(238, 244, 251, 0.9) 46%, rgba(238, 244, 251, 0.62) 100%),
    linear-gradient(135deg, rgba(147, 187, 226, 0.2) 0%, transparent 32%, rgba(30, 83, 139, 0.12) 74%, transparent 100%),
    radial-gradient(circle at 18% 14%, rgba(64, 124, 181, 0.16), transparent 34%),
    radial-gradient(circle at 78% 70%, rgba(15, 44, 89, 0.12), transparent 36%),
    #eef4fb;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1fr);
  min-height: 100vh;
  overflow: hidden;
  padding: clamp(24px, 4vw, 56px);
  position: relative;
}

.portal-shell::before {
  background-image:
    linear-gradient(rgba(13, 25, 50, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 25, 50, 0.05) 1px, transparent 1px),
    linear-gradient(30deg, rgba(64, 124, 181, 0.075) 1px, transparent 1px),
    linear-gradient(150deg, rgba(64, 124, 181, 0.065) 1px, transparent 1px);
  background-size: 36px 36px, 36px 36px, 78px 45px, 78px 45px;
  content: "";
  inset: 0;
  mask-image: linear-gradient(90deg, black, transparent 72%);
  pointer-events: none;
  position: absolute;
}

.portal-shell::after {
  animation: photonSweep 24s ease-in-out infinite alternate;
  background-image:
    linear-gradient(118deg, transparent 4%, rgba(255, 255, 255, 0.58) 5%, rgba(64, 124, 181, 0.16) 6%, transparent 7%),
    linear-gradient(118deg, transparent 34%, rgba(255, 255, 255, 0.42) 35%, rgba(30, 83, 139, 0.13) 36%, transparent 37%),
    radial-gradient(circle, rgba(13, 25, 50, 0.32) 0 1px, transparent 1.7px),
    radial-gradient(circle, rgba(64, 124, 181, 0.28) 0 1px, transparent 1.8px);
  background-position:
    -20vw 0,
    32vw 18vh,
    0 0,
    18px 22px;
  background-size:
    84vw 100%,
    72vw 100%,
    86px 86px,
    132px 132px;
  content: "";
  inset: -10%;
  opacity: 0.42;
  pointer-events: none;
  position: absolute;
  z-index: 0;
}

.identity-panel,
.project-panel {
  position: relative;
  z-index: 1;
}

.identity-panel {
  animation: riseIn 720ms ease both;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - clamp(48px, 8vw, 112px));
  max-width: 720px;
}

.brand-mark {
  animation: softFloat 5.8s ease-in-out infinite;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, 18px);
  margin-bottom: clamp(34px, 7vh, 72px);
  width: max-content;
}

.brand-mark span {
  aspect-ratio: 1;
  background: #1e538b;
  border-radius: 50%;
  box-shadow:
    26px 0 0 rgba(64, 124, 181, 0.45),
    13px 22px 0 rgba(147, 187, 226, 0.62);
}

.section-label {
  color: #407cb5;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 14px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  color: #071542;
  font-size: clamp(64px, 9vw, 132px);
  font-weight: 900;
  line-height: 0.95;
}

.lead {
  color: #35435e;
  font-size: clamp(18px, 2.1vw, 26px);
  line-height: 1.58;
  margin-top: 28px;
  max-width: 720px;
}

.contact-card {
  animation: riseIn 760ms 120ms ease both;
  border: 1px solid rgba(30, 83, 139, 0.16);
  border-radius: 18px;
  display: grid;
  gap: 0;
  margin-top: clamp(36px, 6vh, 72px);
  max-width: 580px;
  overflow: hidden;
}

.contact-card a,
.contact-row {
  align-items: center;
  background: rgba(255, 255, 255, 0.56);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(82px, max-content) minmax(0, 1fr);
  padding: 17px 20px;
  transition:
    background 160ms ease,
    transform 160ms ease;
  min-width: 0;
}

.contact-card > * + * {
  border-top: 1px solid rgba(30, 83, 139, 0.12);
}

.contact-card a:hover {
  background: rgba(255, 255, 255, 0.82);
  transform: translateX(4px);
}

.contact-card span {
  color: #5d6d87;
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
  min-width: 0;
  overflow-wrap: anywhere;
}

.contact-card strong {
  color: #0d1932;
  font-size: clamp(15px, 1.8vw, 18px);
  font-style: normal;
  min-width: 0;
  overflow-wrap: anywhere;
}

.contact-row {
  font-style: normal;
}

.quiet-note {
  animation: riseIn 720ms 220ms ease both;
  color: #66748a;
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 12px;
  margin-top: 28px;
}

.quiet-note span {
  border: 1px solid rgba(30, 83, 139, 0.14);
  border-radius: 999px;
  padding: 8px 12px;
}

.project-panel {
  animation: panelIn 780ms 140ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  align-self: center;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(30, 83, 139, 0.14);
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(13, 25, 50, 0.1);
  padding: clamp(22px, 3vw, 36px);
}

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

h2 {
  color: #071542;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.1;
}

.panel-head > p {
  color: #5d6d87;
  font-size: 14px;
  line-height: 1.5;
  max-width: 180px;
  text-align: right;
}

.project-grid {
  display: grid;
  gap: 14px;
}

.project-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d8e4f2;
  border-radius: 16px;
  display: grid;
  gap: 18px;
  grid-template-columns: 52px 1fr 44px;
  min-height: 122px;
  padding: 18px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.project-card:nth-child(1) {
  animation: cardIn 620ms 220ms ease both;
}

.project-card:nth-child(2) {
  animation: cardIn 620ms 310ms ease both;
}

.project-card:nth-child(3) {
  animation: cardIn 620ms 400ms ease both;
}

.project-card:nth-child(4) {
  animation: cardIn 620ms 490ms ease both;
}

.project-card:hover {
  border-color: rgba(30, 83, 139, 0.34);
  box-shadow: 0 18px 48px rgba(13, 25, 50, 0.09);
  transform: translateY(-2px);
}

.project-card:not(.placeholder):hover .open-arrow {
  transform: translateX(3px) translateY(-2px);
}

.project-card.primary {
  background: #0d1932;
  border-color: #0d1932;
  color: #ffffff;
}

.project-card.placeholder {
  background: rgba(255, 255, 255, 0.48);
  border-style: dashed;
  color: #5d6d87;
  cursor: default;
}

.project-card.placeholder:hover {
  border-color: #d8e4f2;
  box-shadow: none;
  transform: none;
}

.card-index {
  color: #407cb5;
  font-size: 13px;
  font-weight: 900;
}

.project-card.primary .card-index,
.project-card.primary p {
  color: rgba(255, 255, 255, 0.72);
}

h3 {
  color: inherit;
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.22;
}

.project-card p {
  color: #5d6d87;
  font-size: 14px;
  line-height: 1.5;
  margin-top: 8px;
}

.open-arrow {
  align-items: center;
  border: 1px solid rgba(64, 124, 181, 0.2);
  border-radius: 50%;
  display: inline-flex;
  font-size: 20px;
  height: 44px;
  justify-content: center;
  transition:
    border-color 160ms ease,
    transform 160ms ease;
  width: 44px;
}

.project-card.primary .open-arrow {
  border-color: rgba(255, 255, 255, 0.22);
}

.lattice-visual {
  bottom: -9vw;
  filter: saturate(0.85);
  max-width: min(60vw, 840px);
  opacity: 0.22;
  pointer-events: none;
  position: absolute;
  right: -11vw;
  transform: rotate(-4deg);
  width: 60vw;
  z-index: 0;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateX(20px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes softFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

@keyframes photonSweep {
  from {
    transform: translate3d(-0.75vw, 0, 0);
  }
  to {
    transform: translate3d(1vw, -0.5vh, 0);
  }
}

@media (max-width: 980px) {
  .portal-shell {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .identity-panel {
    justify-content: flex-start;
    min-height: auto;
  }

  .project-panel {
    align-self: stretch;
  }

  .panel-head {
    align-items: start;
  }

  .lattice-visual {
    max-width: 760px;
    opacity: 0.14;
    right: -220px;
    width: 88vw;
  }
}

@media (max-width: 640px) {
  .portal-shell {
    gap: 20px;
    padding: 18px;
  }

  .brand-mark {
    margin-bottom: 42px;
  }

  .contact-card a,
  .contact-row,
  .project-card {
    grid-template-columns: 1fr;
  }

  .panel-head {
    display: block;
  }

  .panel-head > p {
    margin-top: 10px;
    max-width: none;
    text-align: left;
  }

  .open-arrow {
    justify-self: start;
  }

  .portal-shell::after {
    animation: none;
    opacity: 0.24;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
