/* Spatial CV prototype styles */

:root {
  color-scheme: light;
  --page-bg: #ffffff;
  --border: rgba(9,13,37,0.08);
  --text: #0b0f1c;
  --muted: #606071;
  --accent: #111827;
  --highlight: #3d82f3;
  --panel-bg: rgba(255,255,255,0.85);
  --card-shadow: 0 20px 45px rgba(18,27,63,0.08);
  --card-border: rgba(12,18,44,0.08);
  --panel-text: #333333; /* dark gray for panels (not pure black) */
}

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

body {
  margin: 0;
  min-height: 100vh;
  /* use Poppins (loaded from Google fonts) as primary modern sans-serif */
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 18px; /* slightly smaller base size for elegance */
  background: var(--page-bg);
  color: var(--text);
}

/* Links: keep same text color but make them identifiable with an underline that uses currentColor */
a {
  color: inherit; /* use same color as surrounding text */
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
  text-decoration-skip-ink: auto;
  transition: text-decoration-style 140ms ease, text-decoration-thickness 140ms ease, opacity 140ms ease;
  cursor: pointer;
}
/* keep visited links consistent */
a:visited { color: inherit; }
/* stronger visual feedback on hover/focus while keeping same color */
a:hover, a:focus {
  text-decoration-style: solid;
  text-decoration-thickness: 1.5px;
  outline: none;
}
/* accessible focus ring when keyboard navigating */
a:focus-visible {
  outline: 3px solid rgba(11,15,28,0.12);
  outline-offset: 3px;
}

/* Make the scene occupy the full viewport */
.page { padding: 0; min-height: 100vh; }

.content {
  display: block; /* single full-bleed scene */
  height: 100vh;
  position: relative;
}

.scene-panel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  border: none;
  background: radial-gradient(circle at 50% 30%, rgba(15,23,42,0.06), transparent 60%);
  box-shadow: none;
  overflow: hidden;
}

#scene-canvas { position: absolute; inset: 0; }

/* Info panel overlay: hidden by default, show active card as an overlay at the right */
.info-panel {
  position: absolute;
  top: 6vh;
  right: 6vw;
  width: min(640px, 48vw);
  height: 88vh;
  display: flex;
  align-items: flex-start;
  pointer-events: auto; /* allow interactions when hidden */
}

/* hide all cards by default */
.info-card { display: none; pointer-events: auto; }

/* when a card has .active it becomes visible as an overlay */
.info-card.active {
  display: block;
  /* fully transparent panel per request: show only text */
  background: transparent;
  padding: 28px;
  border-radius: 12px;
  box-shadow: none;
  border: none;
  max-height: 88vh;
  overflow-y: auto;
  pointer-events: auto;
}

/* backdrop pseudo-element: start transparent and transition to visible when .has-active */
.info-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  /* no blur: keep fully transparent background so panel shows only text */
  background: transparent;
  /* remove backdrop-filter for performance and clarity */
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-radius: 12px;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 320ms ease, backdrop-filter 320ms ease;
}

.info-panel.has-active::before {
  opacity: 1;
}

/* Ensure active card renders above the backdrop and text is readable */
.info-card.active {
  position: relative;
  z-index: 1;
  /* use a dark gray instead of forcing black */
  color: var(--panel-text);
  /* use the chosen Poppins sans-serif for panels to keep typography consistent */
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
.info-card.active h2 { color: #000000; }
.info-card.active h2 { font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; font-weight:600; font-size:26px; letter-spacing: -0.5px; }
.info-card.active .info-card__eyebrow { color: rgba(0,0,0,0.6); }
.info-card.active p { color: rgba(0,0,0,0.95); }
/* remove forced blue color in panels so links inherit the new global style */
.info-card.active a { color: inherit; }

/* mobile: panel becomes full-width bottom sheet */
@media (max-width: 800px) {
  .info-panel { right: 6px; left: 6px; top: auto; bottom: 6px; width: auto; height: auto; }
  .info-card.active { width: calc(100% - 12px); max-height: 60vh; }
}

/* preserve previous small-screen rules as fallback */
@media (max-width: 900px) {
  .scene-panel { height: 100vh; }
}

@media (prefers-reduced-motion: reduce) {
  .info-card {
    transition: none;
  }
}

/* Credits card styles (moved from index.html) */
.credits-card {
  position: fixed;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  z-index: 12000;
  background: transparent; /* transparent as requested */
  padding: 6px;
  pointer-events: auto;
}
.credits-link {
  display: inline-flex;
  width: 40px;   /* smaller clickable area */
  height: 40px;
  align-items: center;
  justify-content: center;
  color: rgba(17,17,17,0.68); /* slightly transparent black */
  text-decoration: none;
  transition: transform 160ms ease, opacity 160ms ease;
  opacity: 0.78; /* overall reduced opacity */
}
.credits-link svg { width: 22px; height: 22px; display:block; }
.credits-link:hover { opacity: 1.0; transform: translateX(-4px); color: rgba(17,17,17,0.95); }
.credits-note { font-size: 12px; color: rgba(0,0,0,0.65); margin-top:6px; }
@media (max-width:720px) { .credits-card { display: none; } }
#scene-canvas + .scene-tagline, .scene-tagline { font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; font-weight: 500; font-size: 18px; }
.scene-nameline { font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; font-weight: 600; font-size: 18px; }
