:root {
  --bg-main: #050608;
  --bg-alt: #070a10;
  --bg-elevated: #0b0f1a;
  --accent: #f5ff7d;
  --accent-soft: rgba(245, 255, 125, 0.08);
  --text-main: #f5f5f7;
  --text-muted: #9ba0b8;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --container-width: 1120px;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: radial-gradient(circle at top, #151822 0, #050608 55%, #020308 100%);
  color: var(--text-main);
  font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* HEADER */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: linear-gradient(
    to bottom,
    rgba(5, 6, 10, 0.96),
    rgba(5, 6, 10, 0.86),
    transparent
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
}

.logo-mark {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: radial-gradient(circle at 30% 20%, #ffffff, #f5ff7d 30%, #151822 100%);
  box-shadow: 0 0 24px rgba(245, 255, 125, 0.5);
}

.main-nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.main-nav a {
  color: var(--text-muted);
  position: relative;
  padding-bottom: 0.2rem;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.18s ease-out;
}

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

.main-nav a:hover::after {
  width: 100%;
}

.ghost-btn {
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
}

.ghost-btn:hover {
  border-color: var(--accent);
  color: var(--text-main);
  background: rgba(245, 255, 125, 0.05);
  box-shadow: 0 0 24px rgba(245, 255, 125, 0.28);
}

.header-cta {
  font-size: 0.8rem;
}

/* HERO */

.hero {
  position: relative;
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  padding: 4rem 0 5rem;
  overflow: hidden;
}

.hero-split-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255, 255, 255, 0.08),
    transparent
  );
  opacity: 0.35;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 3.5rem;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
}

.hero-copy h1 {
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  line-height: 1.15;
  margin: 0.6rem 0 1.4rem;
}

.hero-copy .lead {
  max-width: 32rem;
  color: var(--text-muted);
  font-size: 0.98rem;
}

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

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  border: none;
  background: radial-gradient(circle at 20% 0, #ffffff, #f5ff7d 26%, #292d33 120%);
  color: #050608;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  box-shadow: 0 12px 60px rgba(245, 255, 125, 0.35);
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out,
    filter 0.15s ease-out;
}

.primary-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
  box-shadow: 0 18px 80px rgba(245, 255, 125, 0.5);
}

.text-link {
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.text-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 60%;
  height: 1px;
  background: var(--border-subtle);
  transition: width 0.18s ease, background 0.18s ease;
}

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

.text-link:hover::after {
  width: 100%;
  background: var(--accent);
}

/* HERO VISUAL */

.hero-visual {
  position: relative;
}

.cube-orbit {
  width: min(380px, 80vw);
  aspect-ratio: 1 / 1;
  margin-left: auto;
  position: relative;
  display: grid;
  place-items: center;
}

.cube-shadow {
  position: absolute;
  width: 80%;
  height: 80%;
  border-radius: 999px;
  background: radial-gradient(
    circle,
    rgba(0, 0, 0, 0.8),
    rgba(0, 0, 0, 0.1),
    transparent
  );
  filter: blur(16px);
  transform: translateY(24%);
  opacity: 0.65;
}

.cube-core {
  position: relative;
  width: 70%;
  height: 70%;
  transform-style: preserve-3d;
  animation: cubeFloat 10s infinite ease-in-out;
}

.cube-face {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: linear-gradient(145deg, #20242f, #080a10);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.65);
}

.cube-top {
  clip-path: polygon(50% 0%, 100% 35%, 50% 70%, 0% 35%);
  background: linear-gradient(160deg, #343744, #151822);
}

.cube-left {
  clip-path: polygon(0% 35%, 50% 70%, 50% 100%, 0% 65%);
  background: linear-gradient(145deg, #11131d, #050608);
}

.cube-right {
  clip-path: polygon(100% 35%, 50% 70%, 50% 100%, 100% 65%);
  background: linear-gradient(215deg, #222534, #050608);
}

.cube-core::after {
  content: "";
  position: absolute;
  inset: 28%;
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 20%,
    rgba(245, 255, 125, 0.55),
    transparent 60%
  );
  mix-blend-mode: screen;
  opacity: 0.85;
}

@keyframes cubeFloat {
  0% {
    transform: translateY(-6px) rotateX(10deg) rotateY(-12deg);
  }
  50% {
    transform: translateY(6px) rotateX(14deg) rotateY(12deg);
  }
  100% {
    transform: translateY(-6px) rotateX(10deg) rotateY(-12deg);
  }
}

.cube-caption {
  margin-top: 1.6rem;
  max-width: 18rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* SECTIONS */

.section {
  padding: 4.5rem 0;
  background: radial-gradient(circle at top, #0b0f1a 0, #050608 55%, #020308 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.section-vision {
  background: linear-gradient(180deg, #050608 0, #050608 10%, #05070d 100%);
}

.section-focus {
  background: radial-gradient(circle at top, #0f1422 0, #050608 60%, #020308 100%);
}

.section-lab {
  background: linear-gradient(180deg, #050608 0, #050608 40%, #05070f 100%);
}

.section-contact {
  background: radial-gradient(circle at top left, #141828 0, #050608 50%);
}

.section h2 {
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  margin: 0.75rem 0 1rem;
}

.section-intro {
  max-width: 36rem;
  color: var(--text-muted);
  font-size: 0.96rem;
}

/* GRID HELPERS */

.grid {
  display: grid;
  gap: 1.6rem;
  margin-top: 2.2rem;
}

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

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

/* CARDS */

.card {
  padding: 1.4rem 1.3rem 1.6rem;
  border-radius: 1rem;
  background: radial-gradient(circle at top left, #181c29 0, #05070e 70%);
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.32);
}

.card h3 {
  margin: 0 0 0.6rem;
  font-size: 1rem;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.pill {
  padding: 1.2rem 1.1rem 1.4rem;
  border-radius: 999px;
  background: radial-gradient(circle at 0 0, rgba(245, 255, 125, 0.18), #050608);
  border: 1px solid rgba(245, 255, 125, 0.35);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.pill h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.pill p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.project-card {
  position: relative;
  padding: 1.5rem 1.4rem 1.6rem;
  border-radius: 1.2rem;
  background: radial-gradient(circle at top left, #181c2a 0, #050608 70%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at top left, rgba(245, 255, 125, 0.1), transparent 55%);
  opacity: 0.7;
  mix-blend-mode: screen;
  pointer-events: none;
}

.project-card h3 {
  margin: 0.4rem 0 0.6rem;
  font-size: 1rem;
}

.project-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(245, 255, 125, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.65rem;
  color: var(--accent);
  background: var(--accent-soft);
}

/* CONTACT */

.contact-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2.5rem;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.contact-note {
  color: var(--text-muted);
  font-size: 0.86rem;
}

/* FOOTER */

.site-footer {
  padding: 1.8rem 0 2.2rem;
  background: #050608;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-meta {
  opacity: 0.8;
}

/* REVEAL ON SCROLL */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* RESPONSIVE */

@media (max-width: 900px) {
  .header-inner {
    gap: 1rem;
  }

  .main-nav {
    display: none;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2.8rem;
  }

  .hero {
    padding-top: 3rem;
  }

  .hero-split-line {
    display: none;
  }

  .hero-visual {
    order: -1;
  }

  .contact-inner {
    flex-direction: column;
  }

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

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

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

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
