:root {
  color-scheme: dark;
  --bg: #070a10;
  --surface: rgba(18, 24, 40, 0.72);
  --surface-strong: #101524;
  --text: #eef3ff;
  --muted: #8995b3;
  --faint: #58647f;
  --line: rgba(173, 191, 255, 0.12);
  --cyan: #5ee7ff;
  --violet: #8b7bff;
  --pink: #ff6cab;
  --lime: #9dff7d;
  --amber: #ffb35c;
  --font: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", ui-monospace, "Cascadia Mono", "Roboto Mono",
    monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(100% 55% at 50% -12%, rgba(35, 55, 111, 0.4) 0%, transparent 62%),
    linear-gradient(180deg, #080c15 0%, #070a10 46%, #06080d 100%);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(144, 170, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(144, 170, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 75%);
  content: "";
}

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

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.ambient-blob {
  position: absolute;
  display: block;
  width: 46vmax;
  height: 46vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.14;
  will-change: transform;
}

.ambient-blob--cyan {
  top: -22%;
  right: -6%;
  background: #1bc9ff;
  animation: float-a 22s ease-in-out infinite alternate;
}

.ambient-blob--violet {
  top: 30%;
  left: -22%;
  background: #7357ff;
  opacity: 0.16;
  animation: float-b 26s ease-in-out infinite alternate;
}

@keyframes float-a {
  to {
    transform: translate3d(-8vw, 5vh, 0) scale(1.1);
  }
}

@keyframes float-b {
  to {
    transform: translate3d(7vw, -4vh, 0) scale(0.92);
  }
}

.site-header,
main,
.site-footer {
  width: min(100% - 40px, 1040px);
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding:
    calc(25px + env(safe-area-inset-top))
    0
    18px;
}

.brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  min-width: 0;
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(2, 8px);
  grid-template-rows: repeat(2, 8px);
  gap: 3px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 0 22px rgba(94, 231, 255, 0.1);
  transform: rotate(-5deg);
}

.brand-mark i {
  border-radius: 2px;
  background: var(--violet);
}

.brand-mark i:nth-child(1) {
  background: var(--cyan);
}

.brand-mark i:nth-child(2) {
  background: var(--violet);
}

.brand-mark i:nth-child(3) {
  background: transparent;
}

.brand-mark i:nth-child(4) {
  background: var(--pink);
}

.brand-word {
  overflow: hidden;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.02em;
  color: #e8eeff;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.brand-word span {
  color: #687594;
  font-weight: 500;
}

.hub-label {
  padding: 7px 10px;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #8794b4;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  white-space: nowrap;
}

.hero {
  padding: clamp(62px, 11vw, 110px) 0 clamp(44px, 7vw, 74px);
}

.eyebrow {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 0 0 20px;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.28em;
  color: #7b88a8;
}

.eyebrow::before {
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  content: "";
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(52px, 9vw, 94px);
  font-weight: 850;
  line-height: 0.93;
  letter-spacing: -0.045em;
  color: #f2f6ff;
}

.hero h1 em {
  font-style: normal;
  color: transparent;
  background: linear-gradient(112deg, #b8f7ff 0%, #9185ff 52%, #ffafd0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 34px rgba(129, 115, 255, 0.2));
}

.lede {
  max-width: 470px;
  margin: 26px 0 0;
  font-size: clamp(13px, 1.7vw, 16px);
  line-height: 1.6;
  color: var(--muted);
}

.projects {
  padding-bottom: 64px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}

.section-head h2 {
  margin: 0;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.24em;
  color: #8c99b9;
}

.count {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: #596581;
}

.project-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(250px, 0.9fr) minmax(0, 1.1fr);
  min-height: 356px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(30, 39, 66, 0.82), rgba(10, 14, 24, 0.92) 68%);
  border: 1px solid rgba(173, 191, 255, 0.14);
  border-radius: 28px;
  box-shadow:
    0 34px 80px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.075);
}

.project-card::after {
  position: absolute;
  top: 0;
  left: 9%;
  width: 82%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(94, 231, 255, 0.7),
    rgba(139, 123, 255, 0.7),
    transparent
  );
  content: "";
}

.project-preview {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 320px;
  padding: 42px;
  overflow: hidden;
  background:
    radial-gradient(70% 70% at 45% 45%, rgba(94, 231, 255, 0.09), transparent 72%),
    linear-gradient(160deg, rgba(12, 18, 32, 0.9), rgba(6, 9, 16, 0.98));
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.project-preview::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(5, 8, 14, 0.55));
  content: "";
  pointer-events: none;
}

.mini-board {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(8, 1fr);
  gap: 3px;
  width: min(100%, 226px);
  aspect-ratio: 5 / 8;
  padding: 8px;
  background:
    linear-gradient(180deg, rgba(10, 16, 31, 0.7), rgba(5, 8, 14, 0.9)),
    repeating-linear-gradient(0deg, transparent 0 27px, rgba(137, 158, 214, 0.08) 27px 28px);
  border: 1px solid rgba(160, 183, 255, 0.2);
  border-radius: 13px;
  box-shadow:
    0 24px 50px rgba(0, 0, 0, 0.45),
    0 0 55px rgba(94, 231, 255, 0.08),
    inset 0 0 26px rgba(24, 40, 85, 0.2);
  transform: rotate(-3deg);
}

.mini-board::before {
  position: absolute;
  inset: 8px;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(137, 158, 214, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(137, 158, 214, 0.06) 1px, transparent 1px);
  background-size: calc(20% - 0.6px) calc(12.5% - 0.3px);
  content: "";
}

.mini-board .block {
  position: relative;
  z-index: 1;
  display: block;
  border-radius: 5px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -4px 8px rgba(0, 0, 0, 0.2),
    0 2px 4px rgba(0, 0, 0, 0.18);
}

.mini-board .block:nth-child(1) {
  grid-area: 1 / 3;
  background: linear-gradient(145deg, #9af4ff, #2bc7e8);
}

.mini-board .block:nth-child(2) {
  grid-area: 3 / 1;
}

.mini-board .block:nth-child(3) {
  grid-area: 3 / 2;
}

.mini-board .block:nth-child(4) {
  grid-area: 3 / 3;
}

.mini-board .block:nth-child(5) {
  grid-area: 2 / 2;
}

.mini-board .block:nth-child(6) {
  grid-area: 5 / 4;
}

.mini-board .block:nth-child(7) {
  grid-area: 5 / 5;
}

.mini-board .block:nth-child(8) {
  grid-area: 6 / 4;
}

.mini-board .block:nth-child(9) {
  grid-area: 6 / 5;
}

.mini-board .block:nth-child(10) {
  grid-area: 6 / 1;
}

.mini-board .block:nth-child(11) {
  grid-area: 6 / 2;
}

.mini-board .block:nth-child(12) {
  grid-area: 6 / 3;
}

.mini-board .block:nth-child(13) {
  grid-area: 5 / 2;
}

.mini-board .block:nth-child(14) {
  grid-area: 7 / 1;
}

.mini-board .block:nth-child(15) {
  grid-area: 7 / 4;
}

.block--cyan {
  background: linear-gradient(145deg, #9af4ff, #2bc7e8);
}

.block--violet {
  background: linear-gradient(145deg, #b6a6ff, #7b63f4);
}

.block--pink {
  background: linear-gradient(145deg, #ffc0d4, #ef4f8b);
}

.block--lime {
  background: linear-gradient(145deg, #c8ffb3, #47d97f);
}

.block--amber {
  background: linear-gradient(145deg, #ffd6a8, #f28a31);
}

.project-card + .project-card {
  margin-top: 16px;
}

.project-preview--puzzle {
  background:
    radial-gradient(70% 70% at 50% 45%, rgba(255, 196, 107, 0.1), transparent 72%),
    linear-gradient(160deg, rgba(27, 23, 20, 0.9), rgba(11, 10, 9, 0.98));
}

.project-card--puzzle::after {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 196, 107, 0.72),
    rgba(121, 224, 193, 0.55),
    transparent
  );
}

.puzzle-mini {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  width: min(100%, 208px);
  aspect-ratio: 1;
  padding: 8px;
  background:
    linear-gradient(160deg, rgba(25, 22, 19, 0.9), rgba(8, 8, 8, 0.98));
  border: 1px solid rgba(236, 218, 190, 0.17);
  border-radius: 14px;
  box-shadow:
    0 24px 50px rgba(0, 0, 0, 0.46),
    0 0 55px rgba(255, 190, 95, 0.07),
    inset 0 0 26px rgba(0, 0, 0, 0.24);
  transform: rotate(2.5deg);
}

.puzzle-mini span {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  font-family: var(--mono);
  font-size: clamp(9px, 1.45vw, 13px);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: #171b25;
  background: linear-gradient(145deg, #fffaf0, #e9d9bd);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 5px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -2px 0 rgba(137, 105, 55, 0.13),
    0 2px 4px rgba(0, 0, 0, 0.2);
}

.puzzle-mini .puzzle-empty {
  background: rgba(255, 255, 255, 0.018);
  border: 1px dashed rgba(255, 196, 107, 0.25);
  box-shadow: inset 0 2px 9px rgba(0, 0, 0, 0.3);
}

.project-card--puzzle .project-link {
  background: linear-gradient(135deg, #ffe3a6, #ffc46b 45%, #ff9e58);
  border-color: rgba(255, 239, 202, 0.6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 9px 26px rgba(255, 167, 58, 0.18);
}

.preview-caption {
  position: absolute;
  bottom: 22px;
  left: 24px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.28em;
  color: #61708f;
}

.project-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(28px, 5vw, 54px);
}

.project-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 23px;
}

.status {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 6px 9px;
  font-size: 6.5px;
  font-weight: 750;
  letter-spacing: 0.14em;
  color: #a9e9c0;
  background: rgba(64, 214, 125, 0.075);
  border: 1px solid rgba(102, 235, 155, 0.16);
  border-radius: 999px;
}

.status i {
  width: 5px;
  height: 5px;
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 9px rgba(157, 255, 125, 0.85);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.4;
    box-shadow: 0 0 3px rgba(157, 255, 125, 0.3);
  }
}

.tag {
  font-size: 6.5px;
  font-weight: 650;
  letter-spacing: 0.14em;
  color: #66738f;
}

.project-body h3 {
  margin: 0;
  font-size: clamp(34px, 4.5vw, 48px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  color: #f3f6ff;
}

.project-description {
  max-width: 335px;
  margin: 16px 0 28px;
  font-size: 12px;
  line-height: 1.55;
  color: #929ebc;
}

.project-link {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  padding: 13px 17px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #07121c;
  background: linear-gradient(135deg, #8bf1ff, #66ddff 45%, #a493ff);
  border: 1px solid rgba(211, 250, 255, 0.55);
  border-radius: 12px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 9px 26px rgba(62, 207, 255, 0.2);
  transition:
    transform 160ms ease,
    filter 160ms ease;
}

.project-link svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 160ms ease;
}

.project-link:hover {
  filter: brightness(1.07);
  transform: translateY(-2px);
}

.project-link:hover svg {
  transform: translateX(3px);
}

.project-link:active {
  transform: translateY(0) scale(0.985);
}

.next-card {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 78px;
  padding: 24px 26px;
  background: rgba(255, 255, 255, 0.018);
  border: 1px dashed rgba(160, 180, 235, 0.14);
  border-radius: 18px;
}

.next-plus {
  display: grid;
  flex: none;
  width: 38px;
  height: 38px;
  place-items: center;
  font-family: var(--mono);
  font-size: 18px;
  color: #63708d;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 11px;
}

.next-card h2 {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #b2bdd7;
}

.next-card p {
  margin: 0;
  font-size: 10px;
  line-height: 1.5;
  color: #687590;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding:
    20px
    0
    calc(26px + env(safe-area-inset-bottom));
  font-size: 7px;
  letter-spacing: 0.1em;
  color: #536079;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.footer-stack {
  font-family: var(--mono);
  letter-spacing: 0.02em;
  color: #46516a;
}

@media (max-width: 760px) {
  .site-header,
  main,
  .site-footer {
    width: min(100% - 28px, 560px);
  }

  .site-header {
    padding-top: calc(18px + env(safe-area-inset-top));
  }

  .hero {
    padding: 58px 0 40px;
  }

  .hero h1 {
    max-width: 340px;
    font-size: clamp(48px, 14.5vw, 66px);
  }

  .lede {
    margin-top: 20px;
    font-size: 12px;
  }

  .project-card {
    grid-template-columns: 1fr;
    min-height: 0;
    border-radius: 22px;
  }

  .project-preview {
    min-height: 260px;
    padding: 30px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .mini-board {
    width: min(100%, 168px);
  }

  .puzzle-mini {
    width: min(100%, 168px);
  }

  .preview-caption {
    bottom: 17px;
    left: 19px;
  }

  .project-body {
    padding: 24px 22px 26px;
  }

  .project-meta {
    margin-bottom: 17px;
  }

  .project-body h3 {
    font-size: 36px;
  }

  .project-description {
    margin: 12px 0 22px;
    font-size: 11px;
  }

  .next-card {
    margin-bottom: 42px;
    padding: 20px;
  }

  .site-footer {
    padding-bottom: calc(22px + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-blob,
  .status i {
    animation: none;
  }

  .project-link,
  .project-link svg {
    transition: none;
  }
}
