:root {
  color-scheme: dark;
  --bg: #070a0f;
  --panel: rgb(14 20 30 / 78%);
  --panel2: rgb(9 14 22 / 86%);
  --line: rgb(148 163 184 / 15%);
  --text: #eef6ff;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --blue: #60a5fa;
  --green: #22c55e;
  --amber: #f59e0b;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 75% 8%, rgb(96 165 250 / 14%), transparent 28rem),
    radial-gradient(circle at 12% 30%, rgb(34 197 94 / 8%), transparent 24rem),
    linear-gradient(180deg, #0a1019 0%, var(--bg) 42%, #05070b 100%);
  color: var(--text);
  font-family: "Segoe UI Variable", Inter, "Segoe UI", Arial, sans-serif;
}

a { color: inherit; }

.pageGlow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgb(255 255 255 / 2.6%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 2.6%) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, black, transparent 78%);
}

.portfolioNav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 24px;
  min-height: 68px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgb(7 10 15 / 80%);
  backdrop-filter: blur(18px);
}

.brand,
.navLink,
.portfolioNav nav a,
.heroActions a,
footer a {
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 230px;
  color: #dbeafe;
  font-weight: 760;
}

.brandMark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgb(96 165 250 / 34%);
  border-radius: 12px;
  background: rgb(96 165 250 / 10%);
  color: #bfdbfe;
  font-size: 12px;
  letter-spacing: .08em;
}

.brand span:last-child {
  color: #cbd5e1;
  font-size: 13px;
}

.portfolioNav nav {
  display: flex;
  justify-content: center;
  gap: 22px;
}

.portfolioNav nav a,
.navLink {
  color: #aab8c9;
  font-size: 13px;
}

.portfolioNav nav a:hover,
.navLink:hover,
footer a:hover {
  color: #fff;
}

.langSwitch {
  display: inline-flex;
  justify-self: end;
  padding: 3px;
  border: 1px solid rgb(148 163 184 / 18%);
  border-radius: 999px;
  background: rgb(255 255 255 / 4%);
}

.langSwitch button {
  min-width: 38px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 820;
}

.langSwitch button.active {
  background: rgb(96 165 250 / 18%);
  color: #dbeafe;
}

.navLink {
  justify-self: end;
  padding: 10px 14px;
  border: 1px solid rgb(148 163 184 / 20%);
  border-radius: 999px;
  background: rgb(255 255 255 / 4%);
  font-weight: 720;
}

.hero,
.section,
.introStrip,
footer {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(360px, .78fr);
  align-items: center;
  gap: 48px;
  padding: 78px 0 44px;
}

.kicker,
.eyebrow {
  margin: 0 0 14px;
  color: #93c5fd;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 12px;
  font-size: clamp(44px, 6vw, 76px);
  line-height: .96;
  letter-spacing: -.06em;
}

h2 {
  max-width: 850px;
  margin-bottom: 16px;
  font-size: clamp(27px, 3.2vw, 42px);
  line-height: 1.06;
  letter-spacing: -.04em;
}

h3 {
  margin-bottom: 10px;
  font-size: 24px;
  letter-spacing: -.025em;
}

.roleLine {
  margin-bottom: 22px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 680;
}

.lead,
.sectionText p,
.projectCard p {
  color: #b7c4d5;
  font-size: 15.8px;
  line-height: 1.64;
}

.heroActions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 19px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 780;
}

.primary {
  border: 1px solid rgb(96 165 250 / 60%);
  background: linear-gradient(135deg, #2563eb, #0f2742);
  box-shadow: 0 18px 50px rgb(37 99 235 / 22%);
}

.secondary {
  border: 1px solid rgb(148 163 184 / 22%);
  background: rgb(255 255 255 / 5%);
  color: #d8e4f2;
}

.heroPanel,
.projectCard,
.introStrip article,
.architectureBoard,
.pipelineBoard article,
.profileCard,
.problemList article,
.stackGrid span {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgb(255 255 255 / 6%), transparent),
    var(--panel);
  box-shadow: 0 26px 80px rgb(0 0 0 / 26%);
}

.heroPanel {
  overflow: hidden;
  border-radius: 24px;
  padding: 20px;
}

.panelTop,
.windowTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #aebdce;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.panelTop b {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgb(34 197 94 / 12%);
  color: #9de8ca;
}

.systemMap {
  display: grid;
  gap: 9px;
  margin: 14px 0 18px;
}

.portfolioVideo {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid rgb(148 163 184 / 14%);
  border-radius: 18px;
  background: rgb(2 6 12 / 48%);
}

.heroInlineVideo {
  max-width: 680px;
  margin: 24px 0 0;
}

.videoHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: #aebdce;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.videoHead strong {
  color: #dbeafe;
}

.videoFrame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgb(96 165 250 / 18%);
  border-radius: 14px;
  background: #020617;
  aspect-ratio: 16 / 9;
}

.videoFrame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.systemMap div,
.node {
  border: 1px solid rgb(96 165 250 / 20%);
  border-radius: 16px;
  background: rgb(96 165 250 / 8%);
  color: #dbeafe;
  font-weight: 820;
}

.systemMap div {
  padding: 13px 14px;
}

.systemMap i,
.architectureDiagram i {
  display: block;
  justify-self: center;
  width: 2px;
  height: 16px;
  background: linear-gradient(180deg, rgb(96 165 250 / 0), rgb(96 165 250 / 70%), rgb(96 165 250 / 0));
}

.metricGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.metricGrid article {
  padding: 14px;
  border: 1px solid rgb(148 163 184 / 12%);
  border-radius: 16px;
  background: rgb(255 255 255 / 4%);
}

.metricGrid small,
.introStrip span,
.projectCard li,
.projectCard p,
.tagRow span,
.node small,
.architectureNotes span,
.pipelineBoard small,
.problemList span,
.profileGrid span {
  color: var(--muted);
}

.metricGrid strong {
  display: block;
  margin-top: 4px;
}

.introStrip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 36px;
}

.introStrip article {
  border-radius: 18px;
  padding: 18px;
}

.introStrip strong,
.introStrip span {
  display: block;
}

.introStrip strong {
  margin-bottom: 8px;
}

.section {
  padding: 58px 0;
}

.sectionHead {
  margin-bottom: 28px;
}

.projectStack {
  display: grid;
  gap: 18px;
}

.projectCard {
  overflow: hidden;
  border-radius: 24px;
  padding: 24px;
}

.projectCard.featured {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: 28px;
  align-items: stretch;
  min-height: 430px;
}

.projectIndex {
  display: inline-flex;
  margin-bottom: 24px;
  color: #93c5fd;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .16em;
}

.projectCard ul {
  display: grid;
  gap: 7px;
  margin: 18px 0;
  padding-left: 18px;
}

.tagRow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tagRow span {
  padding: 7px 10px;
  border: 1px solid rgb(148 163 184 / 14%);
  border-radius: 999px;
  background: rgb(255 255 255 / 4%);
  font-size: 12px;
  font-weight: 720;
}

.productFrame {
  min-height: 100%;
  border: 1px solid rgb(148 163 184 / 14%);
  border-radius: 22px;
  background: var(--panel2);
  padding: 16px;
}

.windowTop {
  justify-content: flex-start;
  margin-bottom: 16px;
}

.windowTop span {
  margin-right: auto;
}

.windowTop i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgb(148 163 184 / 30%);
}

.chartSurface {
  position: relative;
  display: flex;
  align-items: end;
  gap: 10px;
  min-height: 340px;
  padding: 22px;
  border-radius: 18px;
  background:
    linear-gradient(rgb(148 163 184 / 8%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(148 163 184 / 8%) 1px, transparent 1px),
    rgb(2 6 12 / 62%);
  background-size: 40px 40px;
}

.chartSurface b {
  flex: 1;
  min-width: 26px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, #60a5fa, #1d4ed8);
}

.chartSurface b:nth-of-type(2n) {
  background: linear-gradient(180deg, #ef4444, #7f1d1d);
}

.priceLine {
  position: absolute;
  left: 22px;
  right: 22px;
  height: 2px;
}

.priceLine.a { top: 31%; background: #f59e0b; }
.priceLine.b { top: 52%; background: #60a5fa; }
.priceLine.c { top: 70%; background: #22c55e; }

.tradeBubble {
  position: absolute;
  right: 24px;
  top: 23%;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgb(34 197 94 / 14%);
  color: #bbf7d0;
  font-size: 12px;
}

.projectGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.miniFlow,
.validationPreview {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 92px;
  margin: 18px 0;
}

.miniFlow span,
.validationPreview strong {
  display: grid;
  place-items: center;
  min-width: 68px;
  min-height: 52px;
  padding: 0 12px;
  border: 1px solid rgb(96 165 250 / 20%);
  border-radius: 16px;
  background: rgb(96 165 250 / 8%);
  color: #dbeafe;
  font-size: 12px;
}

.miniFlow i,
.validationPreview i {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgb(96 165 250 / 58%), transparent);
}

.monitorPreview {
  display: grid;
  gap: 9px;
  margin: 18px 0;
}

.monitorPreview div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgb(148 163 184 / 12%);
  border-radius: 14px;
  background: rgb(255 255 255 / 4%);
}

.monitorPreview b {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
}

.ok { background: rgb(34 197 94 / 12%); color: #bbf7d0; }
.watch { background: rgb(245 158 11 / 12%); color: #fde68a; }

.orderFlowPreview {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  padding: 18px;
  border-radius: 18px;
  background: rgb(2 6 12 / 52%);
}

.orderFlowPreview span {
  display: block;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, #1d4ed8, #60a5fa);
}

.architectureBoard {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 22px;
  border-radius: 24px;
  padding: 24px;
}

.architectureDiagram {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 520px;
}

.node {
  padding: 18px;
  text-align: center;
}

.node small {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 650;
}

.architectureNotes {
  display: grid;
  gap: 12px;
  align-content: center;
}

.architectureNotes article,
.problemList article {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.architectureNotes b,
.problemList b {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgb(96 165 250 / 12%);
  color: #bfdbfe;
}

.split,
.splitReverse {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 42px;
}

.splitReverse {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
}

.splitReverse .sectionText {
  order: 2;
}

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

.pipelineBoard article {
  display: grid;
  gap: 8px;
  min-height: 132px;
  border-radius: 18px;
  padding: 18px;
}

.pipelineBoard span {
  color: #93c5fd;
  font-size: 12px;
  font-weight: 900;
}

.pipelineBoard strong {
  font-size: 18px;
}

.stackGrid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stackGrid span {
  border-radius: 999px;
  padding: 12px 16px;
  color: #dbeafe;
  font-size: 13px;
  font-weight: 760;
}

.problemList {
  display: grid;
  gap: 10px;
}

.problemList article {
  border-radius: 18px;
  padding: 16px;
}

.profileCard {
  border-radius: 24px;
  padding: clamp(24px, 4vw, 38px);
}

.profileGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.profileGrid article {
  padding: 18px;
  border: 1px solid rgb(148 163 184 / 14%);
  border-radius: 18px;
  background: rgb(255 255 255 / 4%);
}

.profileGrid strong,
.profileGrid span {
  display: block;
}

.profileGrid strong {
  margin-bottom: 10px;
}

footer {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 38px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

footer a {
  margin-left: auto;
  color: #dbeafe;
  font-weight: 760;
}

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

  .portfolioNav nav {
    display: none;
  }

  .hero,
  .projectCard.featured,
  .projectGrid,
  .architectureBoard,
  .split,
  .splitReverse,
  .introStrip,
  .profileGrid {
    grid-template-columns: 1fr;
  }

  .splitReverse .sectionText {
    order: initial;
  }
}

@media (max-width: 620px) {
  .hero,
  .section,
  .introStrip,
  footer {
    width: min(100% - 28px, 1180px);
  }

  .portfolioNav {
    padding: 0 14px;
  }

  .brand {
    min-width: 0;
  }

  .brand span:last-child,
  .navLink {
    display: none;
  }

  h1 {
    font-size: 46px;
  }

  .metricGrid,
  .pipelineBoard {
    grid-template-columns: 1fr;
  }

  .chartSurface {
    min-height: 260px;
  }

  .miniFlow,
  .validationPreview {
    flex-wrap: wrap;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  footer a {
    margin-left: 0;
  }
}
