:root {
  --bg: #111210;
  --panel: #191a17;
  --panel-2: #22231f;
  --ink: #f3f1ea;
  --muted: #989a91;
  --line: rgba(243, 241, 234, 0.12);
  --lime: #d8ff72;
  --violet: #a884ff;
  --orange: #ff8f5c;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  font-family: "Manrope", sans-serif;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 70% 10%, rgba(168, 132, 255, 0.08), rgba(168, 132, 255, 0) 28rem),
    var(--bg);
}

button,
input,
a {
  color: inherit;
  font: inherit;
}

a {
  text-decoration: none;
}

.announcement {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 2rem;
  padding: 0.35rem 1rem;
  background: var(--violet);
  color: #110d18;
  font-size: 0.68rem;
  font-weight: 600;
}

.announcement span {
  padding: 0.18rem 0.4rem;
  border: 1px solid rgba(17, 13, 24, 0.35);
  border-radius: 999px;
  font-family: "DM Mono", monospace;
  font-size: 0.54rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.announcement a {
  text-decoration: underline;
  text-underline-offset: 0.18rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 4.4rem;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--line);
  background: rgba(17, 18, 16, 0.84);
  backdrop-filter: blur(18px);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.logo i {
  position: relative;
  display: inline-block;
  width: 1.45rem;
  height: 1.15rem;
  flex-shrink: 0;
  transition: transform 0.85s var(--ease);
}

.logo i::before,
.logo i::after {
  content: "";
  position: absolute;
  top: 0;
  width: 0.5rem;
  height: 1.15rem;
  border-radius: 999px;
  transform: rotate(28deg);
  transition:
    transform 0.85s var(--ease),
    left 0.85s var(--ease),
    right 0.85s var(--ease);
}

.logo i::before {
  left: 0.15rem;
  background: var(--violet);
}

.logo i::after {
  right: 0.15rem;
  background: var(--lime);
}

/* S.AI ↔ SdotAI — the period expands into “dot” */
.logo-word {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  height: 1.2em;
  line-height: 1;
  white-space: nowrap;
}

.logo-s,
.logo-ai {
  flex-shrink: 0;
}

.logo-ai {
  letter-spacing: -0.02em;
}

.logo-mid {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 0.72em;
  margin: 0 0.04em;
  overflow: hidden;
  transition: width 0.9s var(--ease), margin 0.9s var(--ease);
}

.logo-period,
.logo-dot {
  grid-area: 1 / 1;
  transition:
    opacity 0.35s ease,
    transform 0.9s var(--ease),
    filter 0.9s var(--ease);
}

.logo-period {
  z-index: 1;
  width: 0.28em;
  height: 0.28em;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0.35em rgba(216, 255, 114, 0.35);
  opacity: 1;
  transform: scale(1);
  /* hide the "." glyph; the disc is the period */
  color: transparent;
  font-size: 0;
  overflow: hidden;
}

.logo-dot {
  z-index: 0;
  opacity: 0;
  transform: scaleX(0.2);
  filter: blur(2px);
  letter-spacing: -0.05em;
  color: color-mix(in srgb, var(--lime) 55%, var(--ink));
}

.logo.is-expanded .logo-mid {
  width: 1.62em;
  margin: 0;
}

.logo.is-expanded .logo-period {
  opacity: 0;
  transform: scale(0.2);
}

.logo.is-expanded .logo-dot {
  z-index: 1;
  opacity: 1;
  transform: scaleX(1);
  filter: blur(0);
}

.logo.is-expanded i {
  transform: rotate(-8deg) scale(1.04);
}

.logo.is-expanded i::before {
  left: 0.05rem;
  transform: rotate(18deg);
}

.logo.is-expanded i::after {
  right: 0.05rem;
  transform: rotate(38deg);
}

.logo-morph:hover .logo-mid,
.logo-morph:focus-visible .logo-mid {
  width: 1.62em;
  margin: 0;
}

.logo-morph:hover .logo-period,
.logo-morph:focus-visible .logo-period {
  opacity: 0;
  transform: scale(0.2);
}

.logo-morph:hover .logo-dot,
.logo-morph:focus-visible .logo-dot {
  z-index: 1;
  opacity: 1;
  transform: scaleX(1);
  filter: blur(0);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  font-size: 0.72rem;
}

.primary-nav a {
  color: var(--muted);
  transition: color 0.2s ease;
}

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

.header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.6rem;
}

.search-button,
.license-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.58rem 0.85rem;
  background: transparent;
  font-size: 0.68rem;
  cursor: pointer;
}

.license-button {
  background: var(--ink);
  color: var(--bg);
}

.hero {
  position: relative;
  min-height: clamp(34rem, 72vh, 48rem);
  display: grid;
  align-content: center;
  overflow: hidden;
  padding: clamp(5rem, 10vw, 8rem) clamp(1.25rem, 6vw, 6rem);
  border-bottom: 1px solid var(--line);
  isolation: isolate;
}

.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.92;
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.45) 22%, #000 48%, #000 100%);
}

.hero-copy-block {
  position: relative;
  z-index: 2;
  max-width: 49rem;
}

.hero-orbit {
  position: absolute;
  right: clamp(-9rem, 2vw, 2rem);
  top: 50%;
  z-index: 1;
  width: min(40vw, 34rem);
  aspect-ratio: 1;
  transform: translateY(-50%);
  opacity: 0.28;
  pointer-events: none;
  mix-blend-mode: screen;
}

.hero-kicker,
.section-kicker {
  margin: 0 0 0.8rem;
  color: var(--lime);
  font-family: "DM Mono", monospace;
  font-size: 0.61rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 49rem;
  margin: 0;
  font-size: clamp(3.5rem, 8vw, 7.8rem);
  font-weight: 600;
  line-height: 0.86;
  letter-spacing: -0.075em;
  text-wrap: balance;
}

.hero h1 em,
.manifesto h2 em {
  font-family: "Newsreader", serif;
  font-weight: 300;
  color: var(--violet);
}

.hero-copy {
  max-width: 31rem;
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
  width: fit-content;
  margin-top: 1.7rem;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.72rem;
  font-weight: 600;
}

.hero-cta span {
  font-size: 1rem;
}

.orbit-ring {
  position: absolute;
  inset: 8%;
  border: 1px solid var(--line);
  border-radius: 50%;
  animation: orbit-spin 26s linear infinite;
}

.orbit-ring::before,
.orbit-ring::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid var(--line);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit-ring::before {
  width: 62%;
  height: 62%;
}

.orbit-ring::after {
  width: 14%;
  height: 14%;
  background: var(--lime);
  box-shadow: 0 0 4rem rgba(216, 255, 114, 0.35);
}

.orbit-card {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 6.2rem;
  aspect-ratio: 1.18;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.75rem;
  font-family: "DM Mono", monospace;
  font-size: 0.6rem;
  text-transform: uppercase;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.32);
  animation: card-float 4s ease-in-out infinite alternate;
}

.orbit-card-a {
  left: 7%;
  top: 20%;
  background: var(--violet);
  color: #16101f;
}

.orbit-card-b {
  right: 3%;
  top: 39%;
  background: #dce6ee;
  color: #111;
  animation-delay: -1.7s;
}

.orbit-card-c {
  left: 28%;
  bottom: 7%;
  background: var(--orange);
  color: #23120d;
  animation-delay: -2.8s;
}

.orbit-core {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 9rem;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #050605;
  border: 1px solid var(--line);
}

.orbit-core span {
  font-family: "Newsreader", serif;
  font-size: 3.4rem;
  line-height: 0.75;
}

.orbit-core small {
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 0.5rem;
  text-transform: uppercase;
}

.library {
  padding: clamp(3.5rem, 7vw, 6.5rem) clamp(1rem, 3vw, 2rem);
}

.library-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 0 0 2.2rem;
  padding: 0 0.4rem;
}

.library-head h2,
.manifesto h2,
.license h2 {
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 5rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.library-head > p {
  margin: 0;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 0.58rem;
  text-transform: uppercase;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.filter-tabs {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.filter-tabs button {
  border: 0;
  border-radius: 999px;
  padding: 0.5rem 0.75rem;
  background: transparent;
  color: var(--muted);
  font-size: 0.65rem;
  cursor: pointer;
}

.filter-tabs button.is-active {
  background: var(--ink);
  color: var(--bg);
}

.search-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.search-field input {
  width: 11rem;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 0.66rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.study {
  min-width: 0;
  padding: 0.32rem;
  border: 1px solid transparent;
  border-radius: 0.8rem;
  background: var(--panel);
  transition:
    transform 0.45s var(--ease),
    border-color 0.3s ease;
}

.study:hover {
  transform: translateY(-4px);
  border-color: var(--line);
}

.study[hidden] {
  display: none;
}

.study-preview {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1.28;
  border-radius: 0.58rem;
  background: #2b2c28;
}

.study-video,
.study-video-next {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.study-video-next {
  opacity: 0;
}

.study[data-kind="live"] .study-badge {
  background: rgba(17, 18, 16, 0.82);
}

.study[data-kind="motion"] .study-badge {
  background: rgba(216, 255, 114, 0.16);
  color: var(--lime);
}

.live-site-preview {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(168, 132, 255, 0.22), transparent 42%),
    radial-gradient(circle at 78% 70%, rgba(216, 255, 114, 0.12), transparent 36%),
    linear-gradient(160deg, #1c1d19, #121310 62%);
}

.live-site-orb {
  position: absolute;
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 50%;
  border: 1px solid rgba(243, 241, 234, 0.16);
  box-shadow: inset 0 0 2rem rgba(168, 132, 255, 0.18);
  animation: live-orb 7s ease-in-out infinite;
}

.live-site-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.35rem;
  text-align: center;
}

.live-site-copy b {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lime);
}

.live-site-copy i {
  font-style: normal;
  color: var(--muted);
  font-size: 0.85rem;
}

.study:hover .live-site-orb,
.study.is-previewing .live-site-orb {
  transform: scale(1.08);
  border-color: rgba(216, 255, 114, 0.35);
}

@keyframes live-orb {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.concept-preview {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #171814;
}

.concept-preview i,
.concept-preview b {
  position: absolute;
  display: block;
  transition: transform 0.8s var(--ease);
}

.concept-preview-aether {
  background:
    radial-gradient(circle at 55% 43%, rgba(216, 255, 114, 0.22), transparent 8%),
    radial-gradient(circle at 55% 43%, transparent 0 21%, rgba(168, 132, 255, 0.42) 22%, transparent 28%),
    linear-gradient(135deg, #0d1012, #263237);
}

.concept-preview-aether i:first-child {
  width: 54%;
  aspect-ratio: 1;
  left: 28%;
  top: 17%;
  border: 1px solid rgba(238, 255, 206, 0.55);
  border-radius: 50%;
  box-shadow: inset 0 0 2rem rgba(216, 255, 114, 0.15);
}

.concept-preview-forma {
  background: linear-gradient(150deg, #dfd6bf, #7e6b51);
}

.concept-preview-forma i {
  bottom: 14%;
  width: 28%;
  height: 57%;
  background: #302d28;
  box-shadow: inset -1.2rem 0 #554f46;
}

.concept-preview-forma i:first-child {
  left: 21%;
  clip-path: polygon(0 25%, 100% 0, 100% 100%, 0 100%);
}

.concept-preview-forma i:nth-child(2) {
  left: 50%;
  height: 72%;
  clip-path: polygon(0 0, 100% 20%, 100% 100%, 0 100%);
}

.concept-preview-vela {
  background: radial-gradient(circle at 50% 55%, #6b1c49, #120810 72%);
}

.concept-preview-vela i {
  left: 21%;
  top: 8%;
  width: 58%;
  height: 83%;
  border-radius: 44% 56% 36% 64% / 63% 37% 63% 37%;
  background: linear-gradient(125deg, #ff8bbf, #501032 48%, #e34c91);
  filter: saturate(0.8);
}

.concept-preview-keen {
  background:
    radial-gradient(circle at 70% 30%, rgba(230, 160, 74, 0.28), transparent 22%),
    linear-gradient(160deg, #0a0c0e, #151b20);
}

.concept-preview-keen i:first-child {
  left: 18%;
  bottom: 18%;
  width: 64%;
  height: 22%;
  border-radius: 1rem;
  border: 1px solid rgba(231, 225, 212, 0.2);
  background: rgba(26, 32, 38, 0.9);
}

.concept-preview-keen i:nth-child(2) {
  left: 42%;
  bottom: 22%;
  width: 14%;
  aspect-ratio: 1;
  border-radius: 0.55rem;
  background: linear-gradient(160deg, rgba(230, 160, 74, 0.7), #243038);
  transform: translateY(-18%);
}

.concept-preview-keen b {
  left: 58%;
  top: 22%;
  width: 18%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(141, 255, 192, 0.55), transparent 68%);
}

.concept-preview-atlas {
  background:
    linear-gradient(90deg, rgba(18, 22, 26, 0.08) 0 33%, transparent 33% 66%, rgba(18, 22, 26, 0.08) 66%),
    linear-gradient(135deg, #ebe6dc, #d9d1c2);
}

.concept-preview-atlas i:first-child {
  left: 12%;
  top: 18%;
  width: 28%;
  height: 64%;
  border-radius: 0.6rem;
  background: linear-gradient(160deg, #1f3a3a, #0f2424);
}

.concept-preview-atlas i:nth-child(2) {
  left: 46%;
  top: 26%;
  width: 28%;
  height: 56%;
  border-radius: 0.6rem;
  background: linear-gradient(160deg, #3a241f, #1d120f);
  transform: scale(1.08);
}

.concept-preview-atlas b {
  right: 10%;
  top: 22%;
  width: 22%;
  height: 60%;
  border-radius: 0.6rem;
  background: linear-gradient(160deg, #24304a, #121824);
}

.concept-preview-shoonya {
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 160, 40, 0.22), transparent 14%),
    radial-gradient(circle at 50% 48%, rgba(75, 59, 255, 0.18), transparent 34%),
    #050507;
}

.concept-preview-shoonya::before,
.concept-preview-shoonya::after,
.concept-preview-shoonya i,
.concept-preview-shoonya b {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  border: 1px solid rgba(255, 160, 40, 0.55);
  background: transparent !important;
  box-shadow: none !important;
  width: 18%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%) scale(0.2);
  opacity: 0;
  animation: shoonya-wormhole 2.6s linear infinite;
}

.concept-preview-shoonya::before {
  animation-delay: 0s;
  border-color: rgba(255, 170, 60, 0.7);
}

.concept-preview-shoonya::after {
  animation-delay: -0.65s;
  border-color: rgba(255, 120, 50, 0.45);
}

.concept-preview-shoonya i:first-child {
  animation-delay: -1.3s;
  border-color: rgba(255, 160, 40, 0.55);
  width: 18%;
  left: 50%;
  top: 50%;
}

.concept-preview-shoonya i:nth-child(2) {
  animation-delay: -1.95s;
  border-color: rgba(75, 59, 255, 0.5);
  width: 18%;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  clip-path: none;
}

.concept-preview-shoonya b {
  animation-delay: -0.32s;
  border-color: rgba(201, 195, 180, 0.35);
  width: 18%;
  height: auto;
  left: 50%;
  right: auto;
  bottom: auto;
  top: 50%;
}

.study:hover .concept-preview-shoonya > *,
.study.is-previewing .concept-preview-shoonya > *,
.study:hover .concept-preview-shoonya::before,
.study:hover .concept-preview-shoonya::after,
.study.is-previewing .concept-preview-shoonya::before,
.study.is-previewing .concept-preview-shoonya::after {
  animation-duration: 1.55s;
}

@keyframes shoonya-wormhole {
  0% {
    transform: translate(-50%, -50%) scale(0.12);
    opacity: 0;
  }
  12% {
    opacity: 0.85;
  }
  70% {
    opacity: 0.35;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.45);
    opacity: 0;
  }
}

.concept-preview-signal {
  background:
    radial-gradient(circle at 50% 50%, rgba(136, 104, 255, 0.32), transparent 23%),
    #08090e;
}

.concept-preview-signal i {
  left: 38%;
  top: 29%;
  width: 24%;
  aspect-ratio: 1;
  border: 1px solid #b49cff;
  border-radius: 50%;
  box-shadow: 0 0 2rem rgba(168, 132, 255, 0.5);
}

.concept-preview-signal i:nth-child(2) {
  inset: 16%;
  width: auto;
  border-style: dashed;
}

.study:hover .concept-preview:not(.concept-preview-shoonya) > * {
  transform: rotate(8deg) scale(1.08);
}

.study-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0) 45%);
}

.study-number,
.study-badge,
.preview-label {
  position: absolute;
  z-index: 6;
  font-family: "DM Mono", monospace;
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.study-number {
  left: 0.65rem;
  top: 0.65rem;
}

.study-badge {
  right: 0.55rem;
  top: 0.55rem;
  padding: 0.26rem 0.4rem;
  border-radius: 999px;
  background: rgba(10, 10, 9, 0.65);
  backdrop-filter: blur(8px);
}

.preview-label {
  left: 0.65rem;
  bottom: 0.55rem;
  opacity: 0;
  transform: translateY(5px);
  transition: 0.3s var(--ease);
}

.study:hover .preview-label {
  opacity: 1;
  transform: translateY(0);
}

.study-meta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem;
  padding: 0.75rem 0.45rem 0.55rem;
}

.study-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 500;
}

.study-description {
  grid-column: 1;
  margin: 0;
  color: var(--muted);
  font-size: 0.61rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.study-category {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 0.5rem;
  text-transform: uppercase;
}

/* Live preview transition classes */
.study.is-previewing[data-effect="blur"] .study-video {
  animation: preview-blur-out 2.2s var(--ease) infinite;
}

.study.is-previewing[data-effect="blur"] .study-video-next {
  animation: preview-blur-in 2.2s var(--ease) infinite;
}

.study.is-previewing[data-effect="iris"] .study-video-next {
  animation: preview-iris 2.2s var(--ease) infinite;
}

.study.is-previewing[data-effect="zoom"] .study-video {
  animation: preview-zoom-out 2.2s var(--ease) infinite;
}

.study.is-previewing[data-effect="zoom"] .study-video-next {
  animation: preview-zoom-in 2.2s var(--ease) infinite;
}

.study.is-previewing[data-effect="split"] .study-video-next {
  animation: preview-split 2.2s var(--ease) infinite;
}

.study.is-previewing[data-effect="morph"] .study-video-next {
  animation: preview-morph 2.2s var(--ease) infinite;
}

.study.is-previewing[data-effect="burn"]::before {
  content: "";
  position: absolute;
}

.study.is-previewing[data-effect="burn"] .study-video {
  animation: preview-burn-out 2.2s ease-in-out infinite;
}

.study.is-previewing[data-effect="burn"] .study-video-next {
  animation: preview-burn-in 2.2s ease-in-out infinite;
}

.manifesto {
  margin: 2rem;
  padding: clamp(4rem, 8vw, 8rem) clamp(1.5rem, 7vw, 7rem);
  border-radius: 1.25rem;
  background: var(--lime);
  color: #11120e;
}

.manifesto .section-kicker {
  color: #494e31;
}

.manifesto h2 {
  max-width: 55rem;
  font-size: clamp(3rem, 7vw, 7rem);
}

.manifesto h2 em {
  color: #11120e;
}

.manifesto > p:not(.section-kicker) {
  max-width: 36rem;
  margin: 2rem 0 0;
  color: #444839;
  line-height: 1.65;
}

.manifesto-stats {
  display: flex;
  gap: clamp(1rem, 5vw, 5rem);
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(17, 18, 14, 0.2);
  font-family: "DM Mono", monospace;
  font-size: 0.58rem;
  text-transform: uppercase;
}

.manifesto-stats span {
  display: grid;
  gap: 0.2rem;
}

.manifesto-stats strong {
  font-family: "Newsreader", serif;
  font-size: 2.5rem;
  font-weight: 300;
}

.license {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr auto;
  align-items: end;
  gap: 2rem;
  padding: clamp(4rem, 8vw, 8rem) clamp(1.25rem, 5vw, 5rem);
  border-bottom: 1px solid var(--line);
}

.license h2 {
  max-width: 42rem;
}

.license > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.license > a {
  padding: 0.8rem 1rem;
  border-radius: 999px;
  background: var(--violet);
  color: #15101c;
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 0.56rem;
  text-transform: uppercase;
}

.search-dialog {
  width: min(42rem, calc(100vw - 2rem));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--panel);
  color: var(--ink);
}

.search-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

.search-dialog form {
  position: relative;
  display: grid;
  gap: 1rem;
  padding: 2rem;
}

.search-dialog form > button {
  position: absolute;
  right: 1rem;
  top: 0.8rem;
  border: 0;
  background: transparent;
  font-size: 1.3rem;
  cursor: pointer;
}

.search-dialog label {
  font-family: "Newsreader", serif;
  font-size: 2rem;
}

.search-dialog input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0.8rem 0;
  outline: 0;
  background: transparent;
  font-size: 1rem;
}

@keyframes orbit-spin {
  to { transform: rotate(360deg); }
}

@keyframes card-float {
  to { transform: translateY(-12px) rotate(2deg); }
}

@keyframes preview-blur-out {
  0%, 35% { opacity: 1; filter: blur(0); transform: scale(1); }
  55%, 90% { opacity: 0; filter: blur(20px); transform: scale(1.06); }
  100% { opacity: 1; filter: blur(0); }
}

@keyframes preview-blur-in {
  0%, 35% { opacity: 0; filter: blur(20px); transform: scale(0.95); }
  55%, 90% { opacity: 1; filter: blur(0); transform: scale(1); }
  100% { opacity: 0; filter: blur(18px); }
}

@keyframes preview-iris {
  0%, 35% { opacity: 1; clip-path: circle(0% at 50% 50%); }
  65%, 90% { opacity: 1; clip-path: circle(75% at 50% 50%); }
  100% { opacity: 0; clip-path: circle(75% at 50% 50%); }
}

@keyframes preview-zoom-out {
  0%, 36% { opacity: 1; transform: scale(1); filter: blur(0); }
  58%, 90% { opacity: 0; transform: scale(2.3); filter: blur(6px); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes preview-zoom-in {
  0%, 36% { opacity: 0; transform: scale(0.55); filter: blur(7px); }
  58%, 90% { opacity: 1; transform: scale(1); filter: blur(0); }
  100% { opacity: 0; }
}

@keyframes preview-split {
  0%, 35% { opacity: 1; clip-path: polygon(50% 0, 50% 0, 50% 100%, 50% 100%); }
  65%, 90% { opacity: 1; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
  100% { opacity: 0; }
}

@keyframes preview-morph {
  0%, 35% { opacity: 1; clip-path: ellipse(0 0 at 20% 80%); filter: saturate(1.5); }
  55% { clip-path: ellipse(65% 35% at 58% 44%); }
  72%, 90% { opacity: 1; clip-path: ellipse(90% 95% at 50% 50%); filter: saturate(1); }
  100% { opacity: 0; }
}

@keyframes preview-burn-out {
  0%, 36% { opacity: 1; filter: brightness(1) sepia(0); }
  50% { opacity: 0.35; filter: brightness(3) sepia(1) saturate(3); }
  60%, 90% { opacity: 0; filter: brightness(0); }
  100% { opacity: 1; }
}

@keyframes preview-burn-in {
  0%, 50% { opacity: 0; filter: brightness(0); }
  65%, 90% { opacity: 1; filter: brightness(1); }
  100% { opacity: 0; }
}

@media (max-width: 1100px) {
  .gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-orbit {
    opacity: 0.55;
    right: -8rem;
  }
}

@media (max-width: 760px) {
  .hero-particles {
    opacity: 0.7;
    mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
  }

  .hero-orbit {
    opacity: 0.18;
  }

  .announcement {
    text-align: center;
  }

  .announcement span,
  .announcement a {
    display: none;
  }

  .site-header {
    grid-template-columns: 1fr auto;
    padding: 0 1rem;
  }

  .primary-nav,
  .search-button {
    display: none;
  }

  .hero {
    min-height: 38rem;
  }

  .hero-orbit {
    width: 21rem;
    right: -9rem;
    top: 26%;
    opacity: 0.18;
  }

  .hero h1 {
    max-width: 28rem;
  }

  .toolbar,
  .library-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-tabs {
    max-width: 100%;
    overflow-x: auto;
  }

  .search-field {
    display: none;
  }

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

  .license {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

@media (max-width: 500px) {
  .gallery {
    grid-template-columns: 1fr;
  }

  .manifesto {
    margin: 0.75rem;
  }

  .manifesto-stats {
    flex-direction: column;
  }
}

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

  .logo-mid,
  .logo-period,
  .logo-dot,
  .logo i,
  .logo i::before,
  .logo i::after {
    transition: none !important;
  }

  .hero-particles {
    display: none;
  }

  .concept-preview-shoonya::before,
  .concept-preview-shoonya::after,
  .concept-preview-shoonya i,
  .concept-preview-shoonya b {
    animation: none !important;
    opacity: 0.55;
    transform: translate(-50%, -50%) scale(1.1);
  }

  .concept-preview-shoonya i:nth-child(2) {
    transform: translate(-50%, -50%) scale(0.55);
  }

  .concept-preview-shoonya b {
    transform: translate(-50%, -50%) scale(1.7);
  }
}

/* —— Study detail page —— */
.study-page .study-layout {
  padding: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 5vw, 5rem) 4rem;
}

.study-hero {
  max-width: 46rem;
  margin-bottom: 2rem;
}

.study-lead {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.study-fact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 1.2rem;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 0.58rem;
  text-transform: uppercase;
}

.study-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
  align-items: center;
}

.study-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.55rem 0 0;
  padding: 0;
  list-style: none;
}

.study-tags li {
  padding: 0.22rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 0.5rem;
  text-transform: uppercase;
}

.study-tags-lg {
  margin-top: 1rem;
}

.study-stage-wrap {
  margin: 1.5rem 0 2.5rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  overflow: hidden;
  background: var(--panel);
}

.study-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0c0d0b;
}

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

.study-stage-concept {
  position: absolute !important;
  inset: 0 !important;
}

.stage-note {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  z-index: 2;
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.study-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.study-grid article {
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--panel);
}

.study-grid p:not(.section-kicker),
.study-grid li {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.65;
}

.study-grid ul {
  margin: 0.55rem 0 0;
  padding-left: 1.1rem;
}

.sequence-list {
  margin: 0.55rem 0 0;
  padding: 0;
  list-style: none;
}

.sequence-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
}

.sequence-list li:last-child {
  border-bottom: 0;
}

.sequence-list span {
  color: var(--lime);
  font-family: "DM Mono", monospace;
  font-size: 0.55rem;
}

.study-code {
  margin-top: 2rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: #0c0d0b;
}

.study-code pre {
  margin: 0.8rem 0 0;
  overflow-x: auto;
  color: #cfcabe;
  font-family: "DM Mono", monospace;
  font-size: 0.68rem;
  line-height: 1.55;
}

.study-related {
  margin-top: 3rem;
}

.study-related h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.related-card {
  display: grid;
  gap: 0.4rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--panel);
  transition: border-color 0.25s ease, transform 0.35s var(--ease);
}

.related-card:hover,
.related-card:focus-visible {
  border-color: rgba(216, 255, 114, 0.35);
  transform: translateY(-2px);
  outline: none;
}

.related-title {
  font-size: 0.9rem;
  font-weight: 500;
}

.related-teach {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.45;
}

.related-meta {
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 0.5rem;
  text-transform: uppercase;
}

.study-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.study-pager a {
  display: grid;
  gap: 0.25rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  transition: border-color 0.25s ease;
}

.study-pager a:hover,
.study-pager a:focus-visible {
  border-color: rgba(168, 132, 255, 0.45);
  outline: none;
}

.study-pager span {
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 0.52rem;
  text-transform: uppercase;
}

.study-pager strong {
  font-weight: 500;
}

.study-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  grid-column: 1 / -1;
}

.study-complexity {
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 0.48rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.study-complexity.is-beginner { color: #9ad4a0; }
.study-complexity.is-intermediate { color: var(--lime); }
.study-complexity.is-advanced { color: var(--orange); }

.study-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  grid-column: 1 / -1;
  margin-top: 0.15rem;
}

.study-action {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.55rem;
  background: transparent;
  color: var(--muted);
  font-size: 0.58rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.study-action:hover,
.study-action:focus-visible {
  color: var(--ink);
  border-color: rgba(243, 241, 234, 0.35);
  outline: none;
}

.study-action-primary {
  background: var(--ink);
  color: var(--bg);
  border-color: transparent;
}

.study-save[aria-pressed="true"] {
  color: var(--lime);
  border-color: rgba(216, 255, 114, 0.4);
}

.study-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
  padding: 0.75rem 0.45rem 0.55rem;
}

.study-description {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.study:focus-within {
  border-color: var(--line);
}

.study a:focus-visible,
.filter-tabs button:focus-visible,
.search-button:focus-visible,
.license-button:focus-visible,
.hero-cta:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .study-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }
}
