@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;700&display=swap');

:root {
  color-scheme: dark;
  --bg: #050816;
  --bg-2: #0c1226;
  --surface: rgba(13, 19, 37, 0.74);
  --surface-strong: rgba(9, 13, 29, 0.9);
  --surface-soft: rgba(255, 255, 255, 0.04);
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(255, 255, 255, 0.2);
  --text: #edf4ff;
  --muted: #9fb0c7;
  --muted-strong: #76859f;
  --accent: #7c5cff;
  --accent-2: #23d3ee;
  --accent-3: #2dd4bf;
  --accent-4: #f472b6;
  --shadow: 0 28px 80px rgba(2, 6, 23, 0.5);
  --shadow-soft: 0 20px 50px rgba(2, 6, 23, 0.28);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --container: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, sans-serif;
  background:
    radial-gradient(circle at 8% 10%, rgba(124, 92, 255, 0.18), transparent 24%),
    radial-gradient(circle at 88% 14%, rgba(35, 211, 238, 0.16), transparent 22%),
    radial-gradient(circle at 50% 100%, rgba(45, 212, 191, 0.09), transparent 28%),
    linear-gradient(180deg, #02040b 0%, #050816 42%, #080d1a 100%);
  color: var(--text);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 3rem, 3rem 100%;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 80%);
}

::selection {
  background: rgba(124, 92, 255, 0.35);
  color: #fff;
}

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

img {
  max-width: 100%;
  display: block;
}

button,
input,
textarea,
select {
  font: inherit;
}

textarea {
  resize: vertical;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.section {
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(22px);
  background: rgba(3, 8, 20, 0.62);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: max-content;
}

.brand__mark {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: "Space Grotesk";
  font-weight: 700;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 40px rgba(124, 92, 255, 0.32);
}

.brand__text {
  font-family: "Space Grotesk";
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.site-nav {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.site-nav a {
  padding: 0.72rem 0.95rem;
  border-radius: 999px;
  color: var(--muted);
  border: 1px solid transparent;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border);
  transform: translateY(-1px);
}

.site-header__actions {
  display: flex;
  gap: 0.75rem;
  margin-left: 0.25rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.96rem 1.35rem;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: -0.02em;
  border: 1px solid transparent;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button--primary {
  background: linear-gradient(135deg, var(--accent), #9b7cff 36%, var(--accent-2));
  color: #fff;
  box-shadow: 0 18px 50px rgba(124, 92, 255, 0.3);
}

.button--secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-color: var(--border);
}

.button--ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--border);
}

.button--small {
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.73rem;
  color: var(--accent-2);
  font-weight: 700;
}

.heading-xl,
.heading-lg,
.heading-md {
  font-family: "Space Grotesk";
  letter-spacing: -0.05em;
  margin: 0;
  line-height: 0.92;
}

.heading-xl {
  font-size: clamp(3.25rem, 8vw, 6rem);
}

.heading-lg {
  font-size: clamp(2.15rem, 4.4vw, 3.5rem);
  line-height: 1;
}

.heading-md {
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  line-height: 1.05;
}

.lede {
  font-size: clamp(1.02rem, 1.65vw, 1.18rem);
  line-height: 1.8;
  color: var(--muted);
  margin: 0;
}

.kicker {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.hero {
  position: relative;
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(2rem, 4vw, 3rem);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -10% auto auto -6%;
  width: 42rem;
  height: 42rem;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.18), transparent 62%);
  filter: blur(24px);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -6% -12% auto;
  width: 32rem;
  height: 32rem;
  background: radial-gradient(circle, rgba(35, 211, 238, 0.14), transparent 64%);
  filter: blur(22px);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.hero-copy {
  max-width: 42rem;
}

.hero-copy .lede {
  margin-top: 1.25rem;
  max-width: 38rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1.8rem;
}

.metric {
  padding: 1rem 1.1rem;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.metric__value {
  font-family: "Space Grotesk";
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.metric__label {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 0.25rem;
}

.hero-panel {
  display: grid;
  gap: 1rem;
}

.glass-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(12, 19, 39, 0.86), rgba(7, 12, 24, 0.82));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.glass-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 30%, transparent 70%, rgba(255, 255, 255, 0.04));
  pointer-events: none;
}

.preview-card,
.detail-card,
.callout-card,
.hero-spotlight,
.release-card,
.project-card,
.video-card,
.stat-card,
.archive-card,
.repo-hero,
.content-card,
.inline-panel {
  padding: 1.25rem;
}

.preview-card__eyebrow,
.stat-card__eyebrow {
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-3);
  font-weight: 700;
  margin-bottom: 0.7rem;
}

.preview-card h2,
.stat-card h3,
.archive-card h3,
.release-card h3,
.project-card h3,
.video-card h3 {
  margin: 0;
  font-family: "Space Grotesk";
  letter-spacing: -0.04em;
}

.preview-card p,
.stat-card p,
.archive-card p,
.project-card p,
.video-card p,
.release-card p,
.callout-card p,
.content-card p {
  color: var(--muted);
  line-height: 1.75;
  margin: 0.75rem 0 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.85rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.82rem;
}

.hero-spotlight {
  display: grid;
  gap: 1rem;
}

.hero-spotlight__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.latest-video {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
}

.latest-video__thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.latest-video__title {
  margin: 0;
  font-family: "Space Grotesk";
  letter-spacing: -0.04em;
  font-size: 1.05rem;
  line-height: 1.25;
}

.latest-video__meta {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.section-heading .lede {
  max-width: 42rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.card-grid--wide {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.project-card,
.video-card,
.release-card,
.archive-card,
.stat-card,
.callout-card,
.content-card,
.repo-hero {
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.project-card:hover,
.video-card:hover,
.release-card:hover,
.archive-card:hover,
.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.18);
}

.project-card,
.archive-card,
.video-card,
.release-card,
.stat-card,
.callout-card,
.content-card {
  position: relative;
  overflow: hidden;
}

.project-card__thumb,
.archive-card__thumb {
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 20%, hsla(var(--card-hue, 250), 90%, 65%, 0.24), transparent 44%),
    radial-gradient(circle at 82% 82%, hsla(calc(var(--card-hue, 250) + 60), 90%, 60%, 0.18), transparent 46%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}

.project-card__thumb-inner,
.archive-card__thumb-inner {
  height: 100%;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
}

.project-card__thumb-inner strong,
.archive-card__thumb-inner strong {
  font-family: "Space Grotesk";
  font-size: 2.3rem;
  letter-spacing: -0.08em;
  line-height: 1;
}

.project-card__thumb-sub,
.archive-card__thumb-sub {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
}

.project-card__body,
.archive-card__body,
.video-card__body,
.release-card__body {
  display: grid;
  gap: 0.65rem;
}

.card-meta,
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  color: var(--muted);
  font-size: 0.9rem;
  align-items: center;
}

.card-meta a,
.meta a {
  color: #9ad9ff;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.9rem;
}

.inline-link {
  color: #9ad9ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.section-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 1rem;
  align-items: start;
}

.stack {
  display: grid;
  gap: 1rem;
}

.panel-list {
  display: grid;
  gap: 0.75rem;
}

.panel-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.panel-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.panel-row strong {
  display: block;
  font-family: "Space Grotesk";
  letter-spacing: -0.03em;
}

.panel-row span {
  color: var(--muted);
  line-height: 1.6;
}

.project-card--feature {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 1.2fr);
  gap: 1rem;
  align-items: center;
}

.project-card--feature .project-card__thumb {
  margin-bottom: 0;
  min-height: 100%;
}

.project-card--feature .project-card__thumb img {
  height: 100%;
}

.media-frame {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  aspect-ratio: 16 / 10;
}

.media-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.repo-shell {
  display: grid;
  gap: 1rem;
}

.repo-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 1rem;
  align-items: start;
}

.repo-hero__media {
  min-height: 260px;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.repo-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prose {
  color: var(--text);
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  font-family: "Space Grotesk";
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 1.8rem 0 0.8rem;
}

.prose h1 {
  font-size: clamp(2rem, 4vw, 3.3rem);
}

.prose h2 {
  font-size: clamp(1.55rem, 3vw, 2.1rem);
}

.prose h3 {
  font-size: 1.3rem;
}

.prose p,
.prose li {
  color: var(--muted);
  line-height: 1.85;
}

.prose a {
  color: #9ad9ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose img {
  margin: 1.4rem 0;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.prose code {
  padding: 0.18rem 0.38rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.prose pre {
  overflow: auto;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.8);
  border: 1px solid var(--border);
}

.prose blockquote {
  margin: 1.4rem 0;
  padding: 1rem 1.1rem;
  border-left: 3px solid var(--accent);
  background: rgba(124, 92, 255, 0.09);
  border-radius: 0 18px 18px 0;
}

.prose ul,
.prose ol {
  padding-left: 1.25rem;
}

.prose hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 1.75rem 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.back-link:hover {
  color: var(--text);
}

.site-footer {
  margin-top: 4rem;
  padding: 2.5rem 0 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(1, 4, 11, 0.38);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.footer-title {
  font-family: "Space Grotesk";
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
}

.footer-copy {
  color: var(--muted);
  line-height: 1.75;
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
}

.footer-note {
  margin-top: 1.3rem;
  color: var(--muted-strong);
  font-size: 0.92rem;
}

.notice {
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: rgba(34, 211, 238, 0.09);
  border: 1px solid rgba(34, 211, 238, 0.16);
  color: var(--text);
}

.notice p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.notice strong {
  color: var(--text);
}

main.container,
.page-section {
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

main.container > h1:first-child {
  margin-top: 0;
}

main.container > p:first-of-type {
  margin-top: 0;
}

main.container > h1,
main.container > h2 {
  font-family: "Space Grotesk";
  letter-spacing: -0.05em;
  line-height: 1;
}

main.container > h1 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  margin-bottom: 0.75rem;
}

main.container > h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  margin-bottom: 0.65rem;
}

main.container p,
main.container li {
  color: var(--muted);
  line-height: 1.8;
}

main.container ul {
  padding-left: 1.2rem;
}

main.container li + li {
  margin-top: 0.35rem;
}

main.container a {
  color: #9ad9ff;
}

main.container img {
  border-radius: 18px;
}

.fade-in-up {
  animation: fadeInUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1080px) {
  .hero-grid,
  .section-split,
  .repo-hero,
  .project-card--feature,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .site-header__inner {
    flex-wrap: wrap;
  }

  .site-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }

  .site-header__actions {
    margin-left: auto;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 1.1rem, var(--container));
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .latest-video {
    grid-template-columns: 1fr;
  }

  .site-header__actions {
    width: 100%;
    margin-left: 0;
  }

  .button {
    width: 100%;
  }

  .project-card--feature .project-card__thumb {
    margin-bottom: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
