/* ==========================================================================
   iLoveAudit - Single Page 100vh Layout (Dark Theme)
   Matching Changes required V1.docx specifications
   ========================================================================== */

:root {
  /* Brand Theme Colors */
  --bg-primary: #060a14;
  --bg-secondary: #0b1122;
  --bg-card: rgba(15, 23, 42, 0.78);
  --bg-card-hover: rgba(22, 33, 62, 0.88);

  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.7);
  --emerald-halo: rgba(52, 211, 153, 0.35);

  --yellow-step: #ffc000; /* All step fonts inside image in yellow */
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;

  --text-main: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --border-subtle: rgba(255, 255, 255, 0.1);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;

  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------------------------------------------------
   1. Strict 100vh Setup (Zero Scrollbar)
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Everything in black background just like earlier */
body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: radial-gradient(circle at 50% 28%, #0e172e 0%, #070b16 65%, #03050a 100%);
  position: relative;
}

/* Subtle neural background grid */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    radial-gradient(rgba(16, 185, 129, 0.03) 1px, transparent 1px);
  background-size: 32px 32px, 64px 64px;
  background-position: 0 0, 16px 16px;
  pointer-events: none;
  z-index: 0;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

img {
  display: block;
  max-width: 100%;
}

/* --------------------------------------------------------------------------
   2. Header Navigation Bar (With Confucius and Axiom in Top Middle)
   -------------------------------------------------------------------------- */
.site-header {
  height: 56px;
  width: 100%;
  flex-shrink: 0;
  z-index: 100;
  background: rgba(6, 10, 20, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
}

.nav-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Left: Logo */
.brand-wrapper {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-decoration: none;
}

.brand-logo-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(245, 158, 11, 0.5));
  transition: transform 0.25s var(--ease-smooth);
}

.brand-logo:hover .brand-logo-img {
  transform: scale(1.08) rotate(-4deg);
}

.brand-text span {
  color: var(--amber-400);
}

/* Top Middle: Confucius & The Guiding Axiom (P3) */
.header-axiom-middle {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: transparent;
  padding: 0.2rem 0.8rem;
  border-radius: 9999px;
  flex: 1;
  max-width: 720px;
  justify-content: center;
}

.header-confucius-avatar {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  background: #000000;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

.header-confucius-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.header-axiom-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.axiom-title-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber-400);
  line-height: 1.2;
}

.axiom-amber-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber-400);
  box-shadow: 0 0 6px var(--amber-400);
}

.axiom-quote-row {
  font-family: var(--font-serif);
  font-size: 0.92rem;
  font-style: italic;
  color: #f1f5f9;
  line-height: 1.25;
}

.axiom-quote-row span {
  color: var(--emerald-400);
  font-weight: 700;
  font-style: normal;
}

.axiom-quote-author {
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 0.74rem;
  color: #94a3b8;
  margin-left: 0.4rem;
}

/* Right Navigation Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.nav-link {
  font-size: 0.86rem;
  font-weight: 600;
  color: #94a3b8;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.btn-signin {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #0f172a;
  font-weight: 700;
  font-size: 0.84rem;
  padding: 0.38rem 1.1rem;
  border-radius: 9999px;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-signin:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  transform: translateY(-1px);
  color: #000;
}

/* --------------------------------------------------------------------------
   3. Main Central Arena (100vh Single Screen)
   -------------------------------------------------------------------------- */
.main-stage {
  flex: 1;
  min-height: 0;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.arena-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Heading Just Above Human Head (P4 - Enlarged fonts to fill space) */
.stage-headline-box {
  position: absolute;
  top: 1%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 30;
  user-select: none;
  pointer-events: none;
  width: 90%;
  max-width: 900px;
}

.stage-main-title {
  font-size: clamp(1.85rem, 2.7vw, 2.65rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: #ffffff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.85);
}

.stage-main-title .gradient-text {
  background: linear-gradient(135deg, #34d399 0%, #10b981 50%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* SVG Vector Connectors */
.arena-svg-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.connector-line {
  stroke: rgba(16, 185, 129, 0.55);
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  transition: stroke 0.35s ease, stroke-width 0.35s ease, filter 0.35s ease;
}

.connector-line.active {
  stroke: #34d399;
  stroke-width: 3.8;
  filter: drop-shadow(0 0 8px #10b981) drop-shadow(0 0 16px rgba(52, 211, 153, 0.8));
}

.energy-photon {
  opacity: 0;
  fill: #ffffff;
  stroke: #34d399;
  stroke-width: 2;
  filter: drop-shadow(0 0 6px #10b981) drop-shadow(0 0 12px #ffffff);
}

.energy-photon.pulsing {
  opacity: 1;
}

/* Central Brain Hub */
.brain-center-hub {
  position: absolute;
  top: 57%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 215px;
  height: 245px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 25;
  user-select: none;
}

/* Ambient Radial Emerald Aura behind Brain */
.brain-aura-ring {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.25) 0%, rgba(16, 185, 129, 0.06) 50%, transparent 72%);
  pointer-events: none;
  transition: all 0.5s ease;
  z-index: 1;
}

.brain-aura-ring.intense {
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.45) 0%, rgba(52, 211, 153, 0.2) 50%, transparent 75%);
  animation: brain-aura-pulse 1.8s infinite ease-in-out;
}

@keyframes brain-aura-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.85; }
  50% { transform: translate(-50%, -50%) scale(1.08); opacity: 1; }
}

.brain-visual-stack {
  position: relative;
  width: 190px;
  height: 210px;
  z-index: 5;
  transition: transform 0.4s var(--ease-spring);
}

.brain-visual-stack.pulse {
  animation: brain-bounce 0.6s var(--ease-spring);
}

@keyframes brain-bounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.07); filter: drop-shadow(0 0 22px rgba(16, 185, 129, 0.85)); }
  100% { transform: scale(1); }
}

.brain-stage-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.7));
}

.brain-stage-layer.current-stage {
  opacity: 1;
  z-index: 10;
}

/* Activation Progress Bar */
.brain-hud-badge {
  margin-top: 0.35rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 0.25rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--emerald-400);
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  z-index: 20;
}

.brain-hud-badge .meter-bar {
  width: 50px;
  height: 5px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  overflow: hidden;
}

.brain-hud-badge .meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #10b981, #34d399);
  transition: width 0.5s ease;
}

/* --------------------------------------------------------------------------
   4. The 6 Learning Cards (Dark Glassmorphism, Yellow Step Fonts Inside)
   -------------------------------------------------------------------------- */
.step-card {
  position: absolute;
  width: 216px;
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  border-radius: 14px;
  padding: 0.4rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(14px);
  z-index: 20;
  transform-origin: center center;
  overflow: visible;
  transition: 
    transform 0.4s var(--ease-spring), 
    box-shadow 0.4s ease, 
    border-color 0.4s ease, 
    filter 0.4s ease;
}

/* Active Aura State:
   "first image should become bit bigger and brighter with aura around it."
*/
.step-card.active-pulsing {
  transform: scale(1.14);
  filter: brightness(1.22) contrast(1.04);
  border-color: var(--emerald-400);
  box-shadow: 0 0 32px var(--emerald-glow), 0 0 65px var(--emerald-halo), 0 12px 30px rgba(0, 0, 0, 0.7);
  z-index: 40;
}

.step-card.active-pulsing::after {
  content: '';
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border-radius: 18px;
  border: 2px solid var(--emerald-400);
  box-shadow: 0 0 20px var(--emerald-glow);
  animation: aura-expand 1.5s infinite ease-out;
  pointer-events: none;
}

@keyframes aura-expand {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.08); opacity: 0; }
}

/* Image container */
.card-image-box {
  position: relative;
  width: 100%;
  height: 114px;
  border-radius: 10px;
  overflow: hidden;
  background: #0f172a;
}

.card-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-image-box::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 65%, transparent 100%);
  pointer-events: none;
}

/* "All Step fonts inside the image to be in Yellow colour" (P5) */
.card-heading-inside {
  position: absolute;
  bottom: 6px;
  left: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 5;
  color: var(--yellow-step); /* Bright Yellow */
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
}

.card-heading-inside .step-icon {
  color: var(--yellow-step);
  font-size: 0.82rem;
}

/* Taglines OUTSIDE below the image (P7 & P8 with multiline support) */
.card-tagline-outside {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  width: 230px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.3;
  pointer-events: none;
}

/* "Once image goes to normal, make the outline green colour" */
.step-card.completed {
  border-color: #10b981;
  outline: 2px solid #10b981;
  outline-offset: 2px;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.6), 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* --------------------------------------------------------------------------
   5. Positions for 6 Radial Cards (Step 1 & 2 brought down, clear of heading)
   -------------------------------------------------------------------------- */
/* Step 1: Top-Right (brought down to comfortably clear heading) */
.card-pos-1 {
  top: 17.5%;
  left: calc(50% + 155px);
}

/* Step 2: Mid-Right (brought down to balance spacing) */
.card-pos-2 {
  top: 59%;
  left: calc(50% + 170px);
  transform: translateY(-50%);
}
.card-pos-2.active-pulsing {
  transform: translateY(-50%) scale(1.14);
}

/* Step 3: Bottom-Right */
.card-pos-3 {
  bottom: 5%;
  left: calc(50% + 145px);
}

/* Step 4: Bottom-Left */
.card-pos-4 {
  bottom: 5%;
  right: calc(50% + 145px);
}

/* Step 5: Mid-Left (brought down symmetrically with Step 2) */
.card-pos-5 {
  top: 59%;
  right: calc(50% + 170px);
  transform: translateY(-50%);
}
.card-pos-5.active-pulsing {
  transform: translateY(-50%) scale(1.14);
}

/* Step 6: Top-Left (symmetrically brought down with Step 1) */
.card-pos-6 {
  top: 17.5%;
  right: calc(50% + 155px);
}

/* --------------------------------------------------------------------------
   6. Footer (Compact 36px)
   -------------------------------------------------------------------------- */
.site-footer {
  height: 36px;
  width: 100%;
  flex-shrink: 0;
  z-index: 100;
  background: #04060c;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-content {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-tagline {
  color: #cbd5e1;
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   7. Modals (About Me, Resources, Sign In - Popups Without Page Scrolling)
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 1rem;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: #0f172a;
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  width: 100%;
  max-width: 480px;
  padding: 1.75rem;
  position: relative;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7);
  transform: scale(0.94);
  transition: transform 0.25s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.open .modal-box {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 0.35rem;
}

.form-input {
  width: 100%;
  padding: 0.65rem 0.9rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.9rem;
  outline: none;
}

.form-input:focus {
  border-color: var(--emerald-400);
}

/* --------------------------------------------------------------------------
   8. Responsive Laptop Height Adjustments
   -------------------------------------------------------------------------- */
@media (max-height: 760px) {
  .stage-main-title {
    font-size: 1.65rem;
  }
  .step-card {
    width: 195px;
  }
  .card-image-box {
    height: 100px;
  }
  .card-heading-inside {
    font-size: 0.8rem;
  }
  .card-tagline-outside {
    font-size: 0.68rem;
  }
  .brain-visual-stack {
    width: 165px;
    height: 185px;
  }
  .brain-aura-ring {
    width: 230px;
    height: 230px;
  }
}
