:root {
  --ink: #0e1418;
  --ink-soft: #3a454c;
  --muted: #6b767d;
  --paper: #eef3f4;
  --paper-deep: #d8e4e7;
  --accent: #0f8f8a;
  --accent-deep: #0a6b67;
  --line: rgba(14, 20, 24, 0.12);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-brand: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Geist", "Segoe UI", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 55% at 12% -10%, rgba(15, 143, 138, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 95% 15%, rgba(216, 228, 231, 0.9), transparent 50%),
    radial-gradient(ellipse 60% 45% at 70% 100%, rgba(15, 143, 138, 0.08), transparent 55%),
    linear-gradient(165deg, #f4f8f9 0%, #e8f0f2 45%, #e2ecee 100%);
  animation: drift 18s var(--ease) infinite alternate;
}

@keyframes drift {
  from {
    transform: scale(1) translate(0, 0);
  }
  to {
    transform: scale(1.04) translate(-1.2%, 0.8%);
  }
}

.stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: clamp(2.5rem, 6vw, 4rem);
  padding: clamp(3rem, 8vw, 6rem) clamp(1.25rem, 4vw, 2.5rem) 2rem;
  text-align: center;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo {
  margin: 0;
  font-family: var(--font-brand);
  font-optical-sizing: auto;
  font-weight: 800;
  font-size: clamp(3.4rem, 12vw, 7.5rem);
  letter-spacing: -0.055em;
  line-height: 0.92;
  color: var(--ink);
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.9s var(--ease) 0.1s forwards;
}

.projects {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1.75rem, 5vw, 3.5rem);
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.85s var(--ease) 0.35s forwards;
}

.project {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  color: inherit;
  max-width: 18rem;
  padding: 0.25rem 0.5rem;
  transition: color 0.25s var(--ease);
}

.project-name {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(1.15rem, 2.8vw, 1.4rem);
  letter-spacing: -0.015em;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 2px;
  transition: background-size 0.35s var(--ease), color 0.25s var(--ease);
}

.project-hint {
  font-size: 0.9rem;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: var(--muted);
  text-wrap: balance;
}

.project:hover .project-name,
.project:focus-visible .project-name {
  color: var(--accent-deep);
  background-size: 100% 2px;
}

.project:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}

.project--paused {
  opacity: 0.55;
}

.project--paused:hover,
.project--paused:focus-visible {
  opacity: 0.85;
}

.legal {
  position: relative;
  z-index: 1;
  padding: 1.5rem clamp(1.25rem, 4vw, 2.5rem) 2rem;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--muted);
  opacity: 0;
  animation: rise 0.8s var(--ease) 0.7s forwards;
}

.legal p {
  margin: 0.15rem 0;
}

.legal-name {
  color: var(--ink-soft);
  font-weight: 500;
  margin-bottom: 0.35rem !important;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .atmosphere,
  .logo,
  .projects,
  .legal {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 520px) {
  .projects {
    flex-direction: column;
    gap: 1.5rem;
  }
}
