/* ============================================================
   SPLASHPORTFOLIO — Orbital Portfolio
   Project circles orbiting around the brand title
   ============================================================ */

:root {
  /* Surface */
  --bg: #08090c;
  --bg-subtle: #0e1017;

  /* Glow palette */
  --teal: #00e5cc;
  --amber: #4a7fff;
  --purple: #b366ff;

  /* Text */
  --text-primary: #e8eaed;
  --text-secondary: rgba(232, 234, 237, 0.55);
  --text-dim: rgba(232, 234, 237, 0.25);
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Subtle noise texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  pointer-events: none;
  z-index: 9999;
}

/* ---- Orbit Page Layout ---- */
.orbit-page {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 40px 24px;
}

.orbit-scene {
  position: relative;
  width: 500px;
  height: 500px;
}

/* ---- Ambient Glow ---- */
.orbit-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle at 40% 40%, rgba(0, 229, 204, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 60% 60%, rgba(179, 102, 255, 0.10) 0%, transparent 50%),
    radial-gradient(circle, rgba(74, 127, 255, 0.08) 0%, transparent 65%);
  opacity: 0.6;
  pointer-events: none;
  z-index: 1;
  animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.4; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.06); }
}

/* ---- Center Title ---- */
.orbit-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 2;
  pointer-events: none;
}

/* Background logo watermark — behind glow and text */
.orbit-center-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% - 15px));
  width: 160px;
  height: 160px;
  object-fit: contain;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
  filter: blur(1px);
}

.orbit-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 2.4rem;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.1;
  animation: fadeIn 0.6s ease both;
}

.orbit-subtitle {
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
  font-size: 0.9rem;
  color: var(--text-secondary);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 8px;
  animation: fadeIn 0.6s ease 0.2s both;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Orbit Ring ---- */
.orbit-ring {
  position: absolute;
  inset: 0;
  animation: orbitSpin 60s linear infinite;
}

@keyframes orbitSpin {
  from { rotate: 0deg; }
  to { rotate: 360deg; }
}

/* ---- Project Circle (Signet-style) ---- */
.project-circle {
  position: absolute;
  width: 110px;
  height: 110px;
  translate: -50% -50%;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: counterSpin 60s linear infinite, circleAppear 0.5s ease both;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
}

@keyframes circleAppear {
  from { opacity: 0; scale: 0.8; }
  to { opacity: 1; scale: 1; }
}

@keyframes counterSpin {
  from { rotate: 0deg; }
  to { rotate: -360deg; }
}

/* The glowing circle image */
.project-circle-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 1;
  transition: scale 0.3s ease, filter 0.3s ease;
  animation: logoFloat 5s ease-in-out infinite;
}

/* Glow behind the logo — color set per-project */
.project-circle-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200px;
  height: 200px;
  translate: -50% -50%;
  border-radius: 50%;
  opacity: 0.4;
  pointer-events: none;
  animation: circleGlowPulse 4s ease-in-out infinite;
  z-index: 0;
}

@keyframes circleGlowPulse {
  0%, 100% { opacity: 0.3; scale: 1; }
  50% { opacity: 0.5; scale: 1.1; }
}

@keyframes logoFloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -6px; }
}

/* Project name label */
.project-circle-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: 4px;
  text-align: center;
  z-index: 1;
  transition: color 0.3s ease;
  white-space: nowrap;
  position: absolute;
  bottom: -4px;
  left: 50%;
  translate: -50% 100%;
}

/* ---- Color variants ---- */
.project-circle[data-color="teal"] .project-circle-logo {
  filter: drop-shadow(0 0 20px rgba(0, 229, 204, 0.3)) drop-shadow(0 0 50px rgba(0, 229, 204, 0.12));
}
.project-circle[data-color="teal"] .project-circle-glow {
  background: radial-gradient(circle, rgba(0, 229, 204, 0.35) 0%, transparent 70%);
}
.project-circle[data-color="teal"]:hover .project-circle-name {
  color: var(--teal);
}

.project-circle[data-color="amber"] .project-circle-logo {
  filter: drop-shadow(0 0 20px rgba(74, 127, 255, 0.3)) drop-shadow(0 0 50px rgba(74, 127, 255, 0.12));
}
.project-circle[data-color="amber"] .project-circle-glow {
  background: radial-gradient(circle, rgba(74, 127, 255, 0.35) 0%, transparent 70%);
}
.project-circle[data-color="amber"]:hover .project-circle-name {
  color: var(--amber);
}

.project-circle[data-color="purple"] .project-circle-logo {
  filter: drop-shadow(0 0 20px rgba(179, 102, 255, 0.3)) drop-shadow(0 0 50px rgba(179, 102, 255, 0.12));
}
.project-circle[data-color="purple"] .project-circle-glow {
  background: radial-gradient(circle, rgba(179, 102, 255, 0.35) 0%, transparent 70%);
}
.project-circle[data-color="purple"]:hover .project-circle-name {
  color: var(--purple);
}

/* ---- Hover Tooltip ---- */
.project-circle-tooltip {
  position: absolute;
  bottom: -12px;
  left: 50%;
  translate: -50% 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 16px;
  background: rgba(14, 16, 23, 0.92);
  border: 1px solid rgba(232, 234, 237, 0.08);
  border-radius: 10px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  scale: 0.92;
  transition: opacity 0.25s ease, scale 0.25s ease;
  z-index: 10;
}

.project-circle-tooltip-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

.project-circle-tooltip-subtitle {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.project-circle[data-color="teal"] .project-circle-tooltip {
  border-color: rgba(0, 229, 204, 0.15);
  box-shadow: 0 4px 24px rgba(0, 229, 204, 0.08);
}
.project-circle[data-color="amber"] .project-circle-tooltip {
  border-color: rgba(74, 127, 255, 0.15);
  box-shadow: 0 4px 24px rgba(74, 127, 255, 0.08);
}
.project-circle[data-color="purple"] .project-circle-tooltip {
  border-color: rgba(179, 102, 255, 0.15);
  box-shadow: 0 4px 24px rgba(179, 102, 255, 0.08);
}

/* Hover: enlarge logo + show tooltip */
.project-circle:hover .project-circle-tooltip {
  opacity: 1;
  scale: 1;
}
.project-circle:hover .project-circle-logo {
  scale: 1.1;
}
.project-circle:hover .project-circle-glow {
  opacity: 0.65;
}

/* ---- Footer ---- */
.site-footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 32px 24px;
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.about-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 10px 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  margin-bottom: 12px;
  transition: all 0.25s ease;
}

.about-link:hover {
  color: var(--teal);
  border-color: rgba(0, 229, 204, 0.3);
  background: rgba(0, 229, 204, 0.06);
}

/* ============================================================
   Responsive
   ============================================================ */

/* Hide mobile project list and about link on desktop */
.mobile-projects {
  display: none;
}

.mobile-about-link {
  display: none;
}

/* Hide name label — tooltip handles it on desktop */
.project-circle-name {
  display: none;
}

@media (min-width: 900px) {
  .orbit-scene {
    width: 580px;
    height: 580px;
  }
  .orbit-title {
    font-size: 2.8rem;
  }
  .project-circle-logo {
    width: 95px;
    height: 95px;
  }
  .project-circle-glow {
    width: 220px;
    height: 220px;
  }
}

/* ---- Mobile: column list layout ---- */
@media (max-width: 520px) {
  .orbit-page {
    flex-direction: column;
    justify-content: center;
    padding: 60px 24px 40px;
    min-height: 100vh;
    gap: 48px;
  }

  /* Hide orbit on mobile */
  .orbit-scene {
    position: relative;
    width: auto;
    height: auto;
  }
  .orbit-glow {
    width: 400px;
    height: 400px;
    opacity: 0.3;
  }
  .orbit-ring {
    display: none;
  }

  /* Title is no longer absolute — flows normally */
  .orbit-center {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    pointer-events: auto;
  }
  .orbit-title {
    font-size: 2.2rem;
  }
  .orbit-subtitle {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
  }

  /* Show mobile project list */
  .mobile-projects {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 340px;
    z-index: 2;
  }

  .mobile-project {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
    transition: background 0.25s ease, border-color 0.25s ease;
    animation: fadeIn 0.5s ease both;
  }
  .mobile-project:nth-child(2) { animation-delay: 0.1s; }
  .mobile-project:nth-child(3) { animation-delay: 0.2s; }

  .mobile-project:active {
    background: rgba(255, 255, 255, 0.06);
  }

  .mobile-project-logo-wrap {
    position: relative;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
  }

  .mobile-project-glow {
    position: absolute;
    inset: -16px;
    border-radius: 50%;
    opacity: 0.4;
    pointer-events: none;
  }

  .mobile-project-logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 1;
  }

  .mobile-project-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
  }

  .mobile-project-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
  }

  .mobile-project-subtitle {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.3;
  }

  /* Color-specific glows and hover for logo */
  .mobile-project[data-color="teal"] .mobile-project-logo {
    filter: drop-shadow(0 0 12px rgba(0, 229, 204, 0.3));
  }
  .mobile-project[data-color="teal"] .mobile-project-glow {
    background: radial-gradient(circle, rgba(0, 229, 204, 0.3) 0%, transparent 70%);
  }
  .mobile-project[data-color="teal"]:active {
    border-color: rgba(0, 229, 204, 0.15);
  }

  .mobile-project[data-color="amber"] .mobile-project-logo {
    filter: drop-shadow(0 0 12px rgba(74, 127, 255, 0.3));
  }
  .mobile-project[data-color="amber"] .mobile-project-glow {
    background: radial-gradient(circle, rgba(74, 127, 255, 0.3) 0%, transparent 70%);
  }
  .mobile-project[data-color="amber"]:active {
    border-color: rgba(74, 127, 255, 0.15);
  }

  .mobile-project[data-color="purple"] .mobile-project-logo {
    filter: drop-shadow(0 0 12px rgba(179, 102, 255, 0.3));
  }
  .mobile-project[data-color="purple"] .mobile-project-glow {
    background: radial-gradient(circle, rgba(179, 102, 255, 0.3) 0%, transparent 70%);
  }
  .mobile-project[data-color="purple"]:active {
    border-color: rgba(179, 102, 255, 0.15);
  }

  .mobile-about-link {
    display: block;
    text-align: center;
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    letter-spacing: 0.04em;
    margin-top: 8px;
    z-index: 2;
    animation: fadeIn 0.5s ease 0.3s both;
    transition: color 0.25s ease;
  }

  .mobile-about-link:active {
    color: var(--teal);
  }

  .site-footer {
    display: none;
  }
}
