:root {
  color-scheme: dark;
  --bg: #050505;
  --bg-soft: #0b0b0b;
  --surface: rgba(255, 255, 255, 0.055);
  --surface-strong: rgba(255, 255, 255, 0.095);
  --ink: #f7f7f7;
  --muted: #a7a7a7;
  --line: rgba(255, 255, 255, 0.18);
  --line-soft: rgba(255, 255, 255, 0.1);
  --accent: #ffffff;
  --code: rgba(255, 255, 255, 0.1);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.08), transparent 30rem),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}

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

.bg-stars {
  animation: starDrift 18s linear infinite;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.76) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(255, 255, 255, 0.36) 0 1px, transparent 1.5px);
  background-position:
    0 0,
    38px 54px;
  background-size:
    118px 118px,
    184px 184px;
  inset: -20%;
  opacity: 0.22;
  position: absolute;
}

.logo-line {
  border-color: rgba(255, 255, 255, 0.095);
  pointer-events: none;
  position: absolute;
  will-change: opacity, transform;
}

.logo-line-arc {
  animation: logoArcDrift 12s ease-in-out infinite;
  border-bottom: 1px solid;
  border-left: 1px solid;
  border-radius: 999px;
  border-top: 1px solid;
  height: min(70vmin, 760px);
  right: -31vmin;
  top: 20vh;
  transform: rotate(-18deg);
  width: min(70vmin, 760px);
}

.logo-line-inner {
  animation: logoArcDrift 14s ease-in-out infinite reverse;
  border-bottom: 1px solid;
  border-left: 1px solid;
  border-radius: 999px;
  height: min(48vmin, 520px);
  right: -15vmin;
  top: 29vh;
  transform: rotate(-18deg);
  width: min(48vmin, 520px);
}

.logo-line-stem-one,
.logo-line-stem-two {
  animation: lineFloat 7s ease-in-out infinite;
  background: rgba(255, 255, 255, 0.09);
  height: min(37vmin, 420px);
  top: 33vh;
  width: 1px;
}

.logo-line-stem-one {
  right: 20vmin;
}

.logo-line-stem-two {
  animation-delay: -2s;
  right: 7vmin;
}

.logo-line-bar {
  animation: lineFloat 7s ease-in-out infinite reverse;
  background: rgba(255, 255, 255, 0.09);
  height: 1px;
  right: -2vmin;
  top: 52vh;
  width: min(34vmin, 390px);
}

a {
  color: inherit;
}

.topbar,
main,
.footer {
  position: relative;
  z-index: 1;
}

.topbar {
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(5, 5, 5, 0.72);
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  left: 0;
  min-height: 72px;
  padding: 0 6vw;
  position: sticky;
  right: 0;
  top: 0;
  z-index: 10;
}

.brand,
.nav,
.hero-actions,
.hero-stats,
.filters,
.contact-links {
  align-items: center;
  display: flex;
}

.brand {
  font-size: 13px;
  font-weight: 800;
  gap: 11px;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: uppercase;
}

.brand-vertical {
  align-items: flex-start;
  flex-direction: column;
  gap: 7px;
}

.brand-mark {
  border: 1px solid var(--accent);
  color: var(--accent);
  display: grid;
  height: 34px;
  place-items: center;
  width: 34px;
}

.brand-mark.has-logo {
  overflow: hidden;
}

.brand-mark.logo-blue {
  background: #fff;
  border-color: #fff;
}

.brand-mark.logo-white-on-black {
  background: #050505;
  border-color: #f7f7f7;
}

.brand-mark.logo-white-on-black img {
  filter: grayscale(1) brightness(0) invert(1);
}

.brand-mark.logo-black-on-white {
  background: #f7f7f7;
  border-color: #f7f7f7;
}

.brand-mark.logo-black-on-white img {
  filter: grayscale(1) brightness(0);
}

.brand-mark img {
  display: block;
  height: 88%;
  object-fit: contain;
  padding: 3px;
  width: 88%;
}

.nav {
  color: var(--muted);
  gap: 22px;
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.nav a {
  text-decoration: none;
}

.nav a:hover {
  color: var(--ink);
}

main {
  margin: 0 auto;
  max-width: 1240px;
  padding: 0 24px 72px;
}

.hero {
  display: grid;
  min-height: calc(100vh - 72px);
  overflow: hidden;
  padding: 92px 0 36px;
  place-items: end start;
  position: relative;
}

.hero-bg {
  display: none;
}

.hero-bg::before {
  content: none;
}

.orbit {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  position: absolute;
  transform: rotate(-13deg);
}

.orbit-one {
  animation: slowPulse 5.8s ease-in-out infinite;
  height: 46vw;
  min-height: 420px;
  right: -14vw;
  top: 10vh;
  width: 76vw;
}

.orbit-two {
  animation: slowPulse 7.2s ease-in-out infinite reverse;
  height: 28vw;
  min-height: 260px;
  right: 4vw;
  top: 21vh;
  width: 48vw;
}

.satellite-dot {
  animation: pass 7s ease-in-out infinite;
  background: var(--accent);
  border-radius: 999px;
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.9);
  height: 6px;
  position: absolute;
  right: 18vw;
  top: 32vh;
  width: 6px;
}

.hero-copy {
  max-width: 820px;
  padding-bottom: 58px;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  margin: 0 0 14px;
  text-transform: uppercase;
}

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

h1 {
  font-size: clamp(48px, 8vw, 104px);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 0.94;
  margin-bottom: 22px;
  max-width: 980px;
  text-transform: uppercase;
}

h2 {
  font-size: clamp(30px, 4vw, 54px);
  font-weight: 830;
  letter-spacing: 0;
  line-height: 1;
  margin-bottom: 18px;
}

h2 span {
  color: var(--muted);
  display: block;
  font-size: 0.38em;
  font-weight: 760;
  line-height: 1.3;
  margin-top: 8px;
  text-transform: uppercase;
}

.hero-subtitle {
  color: var(--muted);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 760;
  margin: -8px 0 24px;
  text-transform: uppercase;
}

.hero-text {
  color: #d8d8d8;
  font-size: clamp(16px, 1.8vw, 20px);
  margin-bottom: 30px;
  max-width: 650px;
}

.hero-text span {
  color: var(--muted);
  display: block;
  margin-top: 8px;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
}

.button,
.project-link,
.filter-button,
.contact-links a {
  border-radius: 2px;
  font-weight: 850;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.button {
  display: inline-flex;
  font-size: 12px;
  justify-content: center;
  min-height: 46px;
  min-width: 148px;
  padding: 14px 20px;
}

.button:hover,
.project-card:hover,
.project-link:hover,
.contact-links a:hover {
  transform: translateY(-2px);
}

.primary {
  background: var(--accent);
  color: #050505;
}

.secondary {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
}

.secondary:hover {
  background: var(--accent);
  color: #050505;
}

.hero-stats {
  border-top: 1px solid var(--line);
  gap: clamp(22px, 6vw, 72px);
  justify-self: stretch;
  padding: 24px 0 0;
}

.hero-stats div {
  min-width: 96px;
}

.stat-number {
  display: block;
  font-size: clamp(30px, 4vw, 54px);
  font-weight: 850;
  line-height: 1;
}

.stat-label {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-top: 7px;
  text-transform: uppercase;
}

.projects-section,
.about-section,
.contact-section {
  padding: 86px 0;
}

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

.search {
  flex: 0 1 390px;
}

.search input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink);
  font: inherit;
  min-height: 46px;
  outline: none;
  padding: 11px 14px;
  width: 100%;
}

.search input::placeholder {
  color: #737373;
}

.search input:focus {
  border-color: var(--accent);
}

.filters {
  border-bottom: 1px solid var(--line-soft);
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 28px;
}

.filter-button {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  min-height: 44px;
  padding: 10px 18px 12px 0;
}

.filter-button + .filter-button {
  margin-left: 20px;
}

.filter-button:hover,
.filter-button.active {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

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

.project-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  min-height: 278px;
  overflow: hidden;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

.project-card:hover {
  background: rgba(255, 255, 255, 0.065);
  border-color: var(--line);
}

.project-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px;
}

.project-meta {
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  display: flex;
  font-size: 11px;
  font-weight: 850;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 14px;
  text-transform: uppercase;
}

.project-body h3 {
  font-size: 23px;
  font-weight: 820;
  line-height: 1.18;
  margin: 0 0 12px;
}

.project-body p {
  color: var(--muted);
  margin-bottom: 16px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: auto 0 18px;
}

.tag {
  background: var(--code);
  color: #d6d6d6;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 7px;
  text-transform: uppercase;
}

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

.project-link {
  border-bottom: 1px solid var(--accent);
  color: var(--accent);
  font-size: 12px;
  min-height: 30px;
  padding: 4px 0;
}

.project-link:hover {
  color: #cfcfcf;
}

.about-section {
  background: transparent;
  border-bottom: 1px solid var(--line-soft);
  border-top: 1px solid var(--line-soft);
  box-shadow: none;
  margin-top: 18px;
}

.contact-section {
  border-top: 1px solid var(--line-soft);
  color: var(--ink);
}

.about-section p {
  color: #c8c8c8;
  max-width: 800px;
}

code {
  background: var(--code);
  color: var(--ink);
  padding: 2px 6px;
}

.contact-links {
  flex-wrap: wrap;
  gap: 12px;
}

.contact-links a {
  border: 2px solid var(--accent);
  color: var(--accent);
  font-size: 12px;
  min-width: 112px;
  padding: 12px 16px;
  text-align: center;
}

.contact-links a:hover {
  background: var(--accent);
  color: #050505;
}

.footer {
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 13px;
  padding: 28px 24px;
  text-align: center;
}

.footer span {
  display: block;
}

.admin-entry {
  color: rgba(255, 255, 255, 0.36);
  display: inline-block;
  font-size: 11px;
  margin-top: 10px;
  text-decoration: none;
  text-transform: uppercase;
}

.admin-entry:hover {
  color: rgba(255, 255, 255, 0.76);
}

.empty-state {
  border: 1px dashed var(--line);
  color: var(--muted);
  padding: 28px;
  text-align: center;
}

.sr-only {
  clip: rect(0, 0, 0, 0);
  border: 0;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

@keyframes starDrift {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(120px, 120px, 0);
  }
}

@keyframes slowPulse {
  0%,
  100% {
    opacity: 0.32;
    transform: rotate(-13deg) scale(1);
  }

  50% {
    opacity: 0.62;
    transform: rotate(-13deg) scale(1.015);
  }
}

@keyframes pass {
  0%,
  100% {
    opacity: 0.25;
    transform: translate3d(0, 0, 0);
  }

  50% {
    opacity: 1;
    transform: translate3d(-18vw, 9vw, 0);
  }
}

@keyframes lineFloat {
  0%,
  100% {
    opacity: 0.34;
    transform: translate3d(0, 0, 0);
  }

  50% {
    opacity: 0.7;
    transform: translate3d(-16px, 12px, 0);
  }
}

@keyframes logoArcDrift {
  0%,
  100% {
    opacity: 0.22;
    transform: rotate(-18deg) translate3d(0, 0, 0) scale(1);
  }

  50% {
    opacity: 0.44;
    transform: rotate(-18deg) translate3d(-18px, 10px, 0) scale(1.015);
  }
}

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

@media (max-width: 860px) {
  .topbar {
    padding: 0 20px;
  }

  .nav {
    gap: 16px;
  }

  main {
    padding: 0 18px 52px;
  }

  .hero {
    min-height: auto;
    padding: 76px 0 34px;
  }

  .hero-copy {
    padding-bottom: 42px;
  }

  .orbit-one {
    right: -46vw;
    width: 122vw;
  }

  .orbit-two {
    right: -18vw;
    width: 78vw;
  }

  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .search {
    flex-basis: auto;
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .brand span:last-child {
    display: none;
  }

  .nav {
    font-size: 10px;
    gap: 9px;
  }

  .nav a {
    max-width: 58px;
    text-align: center;
  }

  .hero-stats {
    gap: 18px;
    justify-content: space-between;
  }

  .hero-stats div {
    min-width: auto;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }
}
