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

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  font-family: 'Inter', -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  cursor: crosshair;
  user-select: none;
  background: #0e3460;
}

#c {
  position: fixed;
  inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
}

#ui {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

#ui a { pointer-events: auto; cursor: pointer; }

/* ═══ Logo ═══ */
#logo {
  position: absolute;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ═══ Works wrapper ═══ */
#works-wrapper {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  pointer-events: auto;
}

.works-tagline {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.45);
}

.logo-mark svg { width: 44px; height: 44px; display: block; }

.logo-text { display: flex; align-items: baseline; gap: 6px; }

.logo-masse {
  font-size: 32px;
  font-weight: 700;
  color: white;
  letter-spacing: -0.04em;
}

.logo-labs {
  font-size: 32px;
  font-weight: 300;
  color: rgba(255,255,255,0.55);
  letter-spacing: -0.02em;
}

/* ═══ Center ═══ */
#center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#center h1 {
  font-size: 72px;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.05;
  text-align: center;
  color: white;
  text-shadow: 0 4px 60px rgba(0,0,0,0.15);
}

#typed {
  background: linear-gradient(135deg, #e63946, #f5a623);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cursor {
  display: inline-block;
  color: rgba(255,255,255,0.35);
  font-weight: 300;
  animation: blink 1s step-end infinite;
  margin-left: 2px;
}

@keyframes blink { 50% { opacity: 0; } }

/* ═══ Works — artistic portfolio at bottom ═══ */
#works {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.work-item {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: rgba(255,255,255,0.75);
  padding: 14px 24px;
  border-radius: 16px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  transition: all 0.35s cubic-bezier(.25,.46,.45,.94);
  min-width: 220px;
}

.work-item:hover {
  color: white;
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.16);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.25);
}

.work-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.gh-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gh-icon-wrap svg {
  width: 26px;
  height: 26px;
  opacity: 0.8;
}

.work-item:hover .gh-icon-wrap svg { opacity: 1; }

.work-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.work-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: rgba(255,255,255,0.9);
}

.work-desc {
  font-size: 12px;
  font-weight: 400;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.01em;
}

.work-item:hover .work-desc { color: rgba(255,255,255,0.6); }

/* ═══ Ripple ═══ */
.ripple {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  transform: scale(0);
  animation: ripple-out 0.8s ease-out forwards;
}

@keyframes ripple-out {
  0% { transform: scale(0); opacity: 0.35; }
  100% { transform: scale(1); opacity: 0; }
}

/* ═══ Responsive ═══ */
@media (max-width: 768px) {
  html, body {
    overflow: auto;
    height: auto;
    min-height: 100%;
  }

  #ui {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 20px 16px;
    gap: 0;
  }

  #logo {
    position: relative;
    top: auto; left: auto;
    transform: none;
    justify-content: center;
    flex-shrink: 0;
  }

  .logo-mark svg { width: 28px; height: 28px; }
  .logo-masse, .logo-labs { font-size: 20px; }

  #center {
    position: relative;
    inset: auto;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    min-height: 0;
  }

  #center h1 {
    font-size: 28px;
    line-height: 1.15;
  }

  #works-wrapper {
    position: relative;
    bottom: auto; left: auto;
    transform: none;
    gap: 10px;
    flex-shrink: 0;
  }

  .works-tagline {
    font-size: 10px;
    text-align: center;
  }

  #works {
    flex-direction: column;
    gap: 6px;
    width: 100%;
  }

  .work-item {
    min-width: unset;
    width: 100%;
    padding: 10px 14px;
    gap: 10px;
    border-radius: 12px;
  }

  .work-icon, .gh-icon-wrap { width: 32px; height: 32px; border-radius: 8px; }
  .gh-icon-wrap svg { width: 18px; height: 18px; }
  .work-name { font-size: 13px; }
  .work-desc { font-size: 10px; }
}

@media (max-width: 380px) {
  #center h1 { font-size: 24px; }
  .logo-masse, .logo-labs { font-size: 18px; }
  .logo-mark svg { width: 24px; height: 24px; }
  #ui { padding: 16px 12px; }
}

