:root {
  --bg: #050505;
  --bg-soft: #101010;
  --panel: rgba(20, 20, 20, 0.72);
  --panel-strong: rgba(30, 30, 30, 0.92);
  --text: #f5f5f5;
  --muted: #a3a3a3;
  --line: rgba(255, 255, 255, 0.1);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.05), transparent 24%),
    linear-gradient(180deg, #111111 0%, #090909 45%, #030303 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at center, black, transparent 80%);
  opacity: 0.35;
}

.corner-name {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 10000;
  color: rgba(245, 245, 245, 0.78);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  pointer-events: none;
}

.page-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 24px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  padding: 24px clamp(20px, 4vw, 44px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  text-align: center;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.04em;
}

h1 {
  max-width: none;
  margin-inline: auto;
  font-size: clamp(2.4rem, 5.8vw, 4.8rem);
  line-height: 1.02;
}

h1 .headline-primary,
h1 span,
.hero-link {
  display: block;
}

h1 .headline-primary {
  color: var(--text);
}

h1 span,
.hero-link {
  margin-top: 0.14em;
  color: rgba(245, 245, 245, 0.6);
  white-space: nowrap;
}

.hero-subline {
  margin-top: 0.14em;
  color: rgba(245, 245, 245, 0.6);
  white-space: nowrap;
}

.hero-link {
  display: inline;
  margin-top: 0;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 180ms ease;
}


.hero-link:hover,
.hero-link:focus-visible {
  opacity: 0.85;
}

.hero-link:focus-visible,
.back-link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 6px;
}

.projects {
  padding: 96px clamp(6px, 1vw, 12px) 0;
}

.people-section {
  padding-top: 42vh;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 42px;
}

h2 {
  font-size: clamp(2.2rem, 5.2vw, 4.4rem);
  line-height: 1.02;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 24px;
  align-items: stretch;
}

.project-card {
  grid-column: span 1;
  position: relative;
  padding: 34px 30px 30px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 34px 30px 38px 28px;
  background: rgba(10, 10, 10, 0.82);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.18);
  transform: rotate(-0.45deg);
}

.project-card:nth-child(2n) {
  border-radius: 30px 38px 28px 36px;
  transform: rotate(0.55deg);
}

.project-card:nth-child(3n) {
  border-radius: 38px 28px 34px 40px;
  transform: rotate(-0.3deg);
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px 24px 30px 22px;
  pointer-events: none;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: -6px 8px 8px -8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 36px 32px 42px 30px;
  opacity: 0.55;
  pointer-events: none;
  z-index: -1;
}

.project-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.card-emoji {
  margin-bottom: 18px;
  font-size: 2.8rem;
  line-height: 1;
}

.card-emoji-image {
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  display: block;
}

.project-card h3 {
  font-size: 1.42rem;
  margin-bottom: 12px;
}

.project-card p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.hero-subpage {
  min-height: 100vh;
  align-items: center;
  padding-bottom: 0;
}

.hero-subpage .hero-copy {
  position: relative;
}

.title-row {
  display: inline-flex;
  align-items: center;
  gap: 0.24em;
  white-space: nowrap;
  color: var(--text);
}

.title-logo {
  flex: 0 0 auto;
  display: inline-block;
  width: clamp(44px, 7vw, 88px);
  height: auto;
  vertical-align: middle;
}

.back-link {
  border: 0;
  background: transparent;
  display: inline-block;
  position: fixed;
  top: 16px;
  left: 16px;
  margin-bottom: 0;
  color: rgba(245, 245, 245, 0.6);
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
  z-index: 9999;
}

.team-grid {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 18px;
}

.team-grid .project-card {
  text-align: center;
  --card-rot: 0deg;
  border-radius: 14px;
  padding: 28px 18px;
  min-height: 250px;
  aspect-ratio: 2.8 / 4;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  transform: rotate(var(--card-rot));
}

.team-grid .project-card p {
  text-align: center;
}

.team-grid .card-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-top: 14px;
  color: rgba(245, 245, 245, 0.92);
  font-size: 1.1rem;
}

.team-grid .card-action-shop svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: currentColor;
}

.team-grid .card-action-arrow[data-nav] {
  position: relative;
  cursor: pointer;
}

.team-grid .card-action-arrow[data-nav]::after {
  content: "Go to page";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(4px);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(20, 20, 20, 0.96);
  color: rgba(245, 245, 245, 0.92);
  transition: opacity 160ms ease, transform 160ms ease;
}

.team-grid .card-action-arrow[data-nav]:hover::after,
.team-grid .card-action-arrow[data-nav]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.team-grid .project-card:nth-child(2n) {
  --card-rot: 0deg;
}

.team-grid .project-card:nth-child(3n) {
  --card-rot: 0deg;
}

.js .team-grid .project-card.reveal {
  opacity: 0;
  transform: translateY(28px) rotate(var(--card-rot)) scale(0.985);
  transition:
    opacity 700ms ease,
    transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: var(--delay, 0ms);
}

.js .team-grid .project-card.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) rotate(var(--card-rot)) scale(1);
}

.team-grid .card-emoji {
  margin-bottom: 22px;
}

.js .reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  transition:
    opacity 700ms ease,
    transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: var(--delay, 0ms);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.hero-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.9;
}

.orb-one {
  top: 16%;
  right: 10%;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.13), transparent 70%);
}

.orb-two {
  right: -40px;
  bottom: 20%;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.09), transparent 72%);
}

.orb-three {
  left: 42%;
  bottom: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 68%);
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 1200px);
    padding-top: 0;
  }

  .hero {
    min-height: 100vh;
    padding-inline: 18px;
  }

  .corner-name {
    display: none;
  }

  h1 {
    font-size: clamp(2.1rem, 10vw, 3.4rem);
    line-height: 1.04;
  }

  h1 span {
    white-space: normal;
  }

  .hero-link {
    white-space: normal;
  }

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

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

  .team-grid .project-card {
    min-height: 210px;
    aspect-ratio: auto;
    padding: 18px 14px;
  }

  .team-grid .project-card h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
  }

  .team-grid .project-card p {
    font-size: 0.92rem;
    line-height: 1.55;
  }

  .people-section {
    padding-top: 22vh;
  }

  .title-row {
    gap: 0.2em;
  }

  .title-logo {
    width: clamp(36px, 11vw, 64px);
  }

  .back-link {
    top: 12px;
    left: 12px;
  }

  .project-card {
    padding: 24px;
    transform: none;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
