:root {
  color-scheme: dark;
  --bg: #050b14;
  --surface: rgba(12, 24, 40, .68);
  --line: rgba(191, 224, 255, .14);
  --text: #eef7ff;
  --muted: #91a7ba;
  --ice: #9cddff;
  --blue: #5b8cff;
  --mint: #83f5d0;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    var(--bg);
  background-size: 72px 72px;
  font-family: "DM Sans", system-ui, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 45%), rgba(91,140,255,.15), transparent 32%),
    radial-gradient(ellipse at 70% 15%, rgba(139,92,246,.12), transparent 35%),
    radial-gradient(ellipse at 25% 80%, rgba(0,210,255,.08), transparent 32%);
}

a { color: inherit; }

.aurora {
  position: fixed;
  width: 46vw;
  height: 46vw;
  border-radius: 50%;
  filter: blur(110px);
  opacity: .16;
  pointer-events: none;
  animation: drift 14s ease-in-out infinite alternate;
}

.aurora-one { top: -24vw; right: -8vw; background: var(--blue); }
.aurora-two { bottom: -30vw; left: -12vw; background: var(--mint); animation-delay: -7s; }
.aurora-three { top: 28vh; left: 38vw; width:34vw; height:34vw; background:#8b5cf6; opacity:.12; animation-duration:19s; animation-delay:-4s; }

.constellation {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.snow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .22;
  background-image:
    radial-gradient(circle, #dff5ff 1px, transparent 1.5px),
    radial-gradient(circle, #dff5ff .8px, transparent 1.2px);
  background-position: 0 0, 38px 52px;
  background-size: 110px 110px, 86px 86px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.topbar,
main,
footer {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.topbar {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: -.03em;
  text-decoration: none;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
}

.status i,
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 14px var(--mint);
  animation: pulse 1.8s ease-in-out infinite;
}

main {
  min-height: calc(100vh - 190px);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(330px, .8fr);
  align-items: center;
  gap: clamp(52px, 8vw, 120px);
  padding-block: 76px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 25px;
  color: var(--ice);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.eyebrow span { color: var(--muted); }

h1 {
  max-width: 650px;
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(40px, 4.8vw, 66px);
  line-height: 1.02;
  letter-spacing: -.055em;
}

h1 em {
  color: transparent;
  font-style: normal;
  background: linear-gradient(100deg, var(--ice), #b7adff 75%);
  background-clip: text;
  -webkit-background-clip: text;
}

.lead {
  max-width: 590px;
  margin: 31px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.65;
}

.build-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 30px 90px rgba(0,0,0,.32), inset 0 1px rgba(255,255,255,.04);
  backdrop-filter: blur(20px);
  transform: rotate(1.5deg);
}

.card-top,
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .13em;
}

.card-top { border-bottom: 1px solid var(--line); }
.card-footer { border-top: 1px solid var(--line); letter-spacing: 0; }
.card-footer strong { color: var(--text); font-weight: 600; }

.terminal {
  min-height: 250px;
  padding: 32px 26px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.terminal p { margin: 0 0 22px; color: var(--muted); }
.terminal p:first-child { margin-bottom: 35px; color: var(--text); }
.prompt { margin-right: 10px; color: var(--ice); }
.ok { margin-right: 11px; color: var(--mint); }
.loader { margin-right: 11px; color: #b7adff; }

.cursor {
  display: inline-block;
  width: 7px;
  height: 14px;
  margin-left: 7px;
  vertical-align: -2px;
  background: var(--ice);
  animation: blink 1s steps(1) infinite;
}

.projects {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 110px 0 125px;
  border-top: 1px solid var(--line);
}

.projects-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  align-items: end;
  gap: 35px;
  margin-bottom: 45px;
}

.projects-heading .eyebrow { grid-column: 1 / -1; margin-bottom: -10px; }

.projects h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1;
  letter-spacing: -.055em;
}

.projects-heading > p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.project-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(10, 21, 35, .72);
  text-decoration: none;
  box-shadow: 0 28px 70px rgba(0,0,0,.24);
  transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease;
}

.project-card:hover {
  transform: translateY(-7px);
  border-color: rgba(156,221,255,.36);
  box-shadow: 0 34px 90px rgba(0,0,0,.36);
}

.project-card figure {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  margin: 0;
  background: #0b1420;
}

.project-card figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5,11,20,.55), transparent 45%);
  pointer-events: none;
}

.project-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform .5s ease;
}

.project-card:hover img { transform: scale(1.035); }

.project-meta { padding: 25px 26px 27px; }

.project-meta > span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ice);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .15em;
}

.project-meta > span i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px var(--mint);
}

.project-meta h3 {
  margin: 12px 0 7px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 27px;
  letter-spacing: -.035em;
}

.project-meta p {
  min-height: 48px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.project-meta strong {
  display: flex;
  justify-content: space-between;
  margin-top: 22px;
  color: var(--text);
  font-size: 13px;
}

.project-meta strong b { color: var(--ice); font-size: 18px; }

footer {
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: #64798b;
  font-size: 12px;
}

@keyframes pulse { 50% { opacity: .35; transform: scale(.8); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes drift { to { transform: translate(6vw, 4vw) scale(1.08); } }

@media (max-width: 820px) {
  .topbar, main, .projects, footer { width: min(100% - 32px, 620px); }
  .topbar { min-height: 78px; }
  main { grid-template-columns: 1fr; gap: 55px; padding-block: 64px; }
  .build-card { transform: none; }
  .projects { padding-block: 80px; }
  .projects-heading { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  footer { min-height: 80px; }
}

@media (min-width: 821px) and (max-width: 1080px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .status { font-size: 0; }
  .status i { width: 8px; height: 8px; }
  h1 { font-size: clamp(38px, 11vw, 54px); }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 7px; }
}

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