/* 3D Portfolio page (full-screen WebGL + UI overlay) */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', Arial, sans-serif;
  background: radial-gradient(circle at top, #0b1020 0%, #070a12 55%, #04050a 100%);
  color: #e9eefc;
  overflow: hidden;
}

#three-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  outline: none;
}

.ui {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.ui-top {
  pointer-events: auto;
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(14, 18, 34, 0.55);
  border: 1px solid rgba(120, 150, 255, 0.18);
  box-shadow: 0 10px 40px rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
}

.brand {
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.2px;
}
.brand:hover { text-decoration: underline; }

.ui-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.ui-chip {
  border: 1px solid rgba(180, 200, 255, 0.22);
  background: rgba(30, 45, 90, 0.30);
  color: #eaf0ff;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.15s ease, background 0.15s ease, border 0.15s ease;
}
.ui-chip:hover {
  transform: translateY(-1px);
  background: rgba(74, 107, 223, 0.35);
  border-color: rgba(255, 230, 102, 0.35);
}

.ui-actions {
  display: flex;
  gap: 10px;
}
.ui-link {
  pointer-events: auto;
  color: rgba(233, 238, 252, 0.92);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
}
.ui-link:hover {
  background: rgba(255,255,255,0.10);
}

.ui-panel {
  pointer-events: auto;
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: min(420px, calc(100vw - 32px));
  max-height: min(70vh, 560px);
  overflow: auto;
  border-radius: 18px;
  padding: 16px 16px 14px 16px;
  background: rgba(14, 18, 34, 0.62);
  border: 1px solid rgba(120, 150, 255, 0.18);
  box-shadow: 0 16px 60px rgba(0,0,0,0.45);
  backdrop-filter: blur(12px);
}

.ui-panel-header { margin-bottom: 10px; }
.ui-panel-title { font-weight: 800; font-size: 1.15rem; }
.ui-panel-subtitle { opacity: 0.85; margin-top: 6px; font-size: 0.95rem; }
.ui-panel-body p { opacity: 0.95; line-height: 1.55; }

.ui-hint {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(74, 107, 223, 0.16);
  border: 1px solid rgba(74, 107, 223, 0.25);
}

.ui-panel-footer {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.ui-cta {
  display: inline-block;
  text-decoration: none;
  color: #0b1020;
  background: linear-gradient(135deg, #ffe066 0%, #ffb703 100%);
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 800;
}
.ui-cta:hover { filter: brightness(1.03); }

.ui-icons { display: flex; gap: 10px; }
.ui-icon {
  color: rgba(233, 238, 252, 0.92);
  text-decoration: none;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
}
.ui-icon:hover { background: rgba(255,255,255,0.10); }

.ui-toast {
  pointer-events: none;
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(14, 18, 34, 0.70);
  border: 1px solid rgba(120, 150, 255, 0.18);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  max-width: min(520px, calc(100vw - 32px));
}
.ui-toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 820px) {
  .ui-top { flex-direction: column; align-items: stretch; }
  .ui-actions { justify-content: space-between; }
  .ui-panel { left: 16px; right: 16px; width: auto; }
}

