/* ==========================================================================
   Design Portfolio Theme & Layout Styles
   ========================================================================== */

:root {
  /* Background color */
  --bg-color: #231c2fff;
  --text-main: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.7);
  --text-dim: rgba(255, 255, 255, 0.45);
  --accent-color: #ffffff;
  --error-color: #ff6b81;
  --border-color: rgba(255, 255, 255, 0.2);
  --border-focus: rgba(255, 255, 255, 0.6);
  
  --font-sans: 'Google Sans Flex', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --transition-smooth: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

/* ==========================================================================
   Landing Screen / Gatekeeper View
   ========================================================================== */

.landing-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-color);
  background-image: 
    radial-gradient(ellipse 110% 90% at 20% 25%, rgba(126, 70, 205, 0.45) 0%, transparent 60%),
    radial-gradient(ellipse 95% 85% at 80% 75%, rgba(85, 40, 165, 0.38) 0%, transparent 65%),
    radial-gradient(circle at 50% 45%, rgba(104, 48, 184, 0.22) 0%, transparent 75%),
    linear-gradient(145deg, #2e213e 0%, #231c2f 50%, #150f1d 100%);
  z-index: 10;
  overflow: hidden;
  transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s ease;
  padding: 2rem;
}

/* Pixelated Grain Texture Overlay */
.grain-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url('grain.png');
  background-repeat: repeat;
  background-size: 160px 160px;
  mix-blend-mode: overlay;
  opacity: 0.35;
  pointer-events: none;
  z-index: 2;
  image-rendering: pixelated;
}

.landing-screen.fade-out {
  opacity: 0;
  transform: scale(0.98);
  pointer-events: none;
  visibility: hidden;
}

.center-card {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Interactive Background Canvas
   ========================================================================== */

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

@media (hover: none) and (pointer: coarse) {
  .cursor-dot,
  .cursor-ring,
  .cursor-glow {
    display: none !important;
  }
}

/* Header & Typography */
.header-group {
  margin-bottom: 2.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 400;
  color: var(--text-main);
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.hero-title {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.25em;
  font-size: clamp(3.2rem, 8.5vw, 6.2rem);
  line-height: 1.05;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.title-name {
  font-family: var(--font-sans);
  font-weight: 400;
}

.title-pronunciation {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  letter-spacing: -0.01em;
}

/* Form & Input Field */
.password-form {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.input-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 9999px;
  transition: var(--transition-smooth);
}

.input-wrapper:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.09);
}

.input-wrapper:focus-within {
  border-color: var(--border-focus);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
}

.password-input {
  width: 100%;
  padding: 0.85rem 1.25rem;
  padding-right: 3.25rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-main);
  background: transparent;
  border: none;
  outline: none;
}

.password-input::placeholder {
  color: var(--text-dim);
  font-weight: 400;
}

.submit-btn {
  position: absolute;
  right: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 9999px;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.submit-btn:hover {
  background: var(--text-main);
  color: var(--bg-color);
  transform: translateX(1px);
}

.arrow-icon {
  width: 16px;
  height: 16px;
}

/* Error feedback */
.error-message {
  min-height: 1.5rem;
  margin-top: 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--error-color);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.error-message.show {
  opacity: 1;
}

/* Shake Animation on Wrong Password */
.shake {
  animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(4px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
  40%, 60% { transform: translate3d(6px, 0, 0); }
}

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

/* ==========================================================================
   Fullscreen Slides Presentation View
   ========================================================================== */

.slides-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background-color: #000000;
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s ease;
}

.slides-container.active {
  opacity: 1;
  visibility: visible;
}

.slides-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  background-color: #000;
}

/* ==========================================================================
   Floating Presentation HUD (Controls Dock)
   ========================================================================== */

.hud-dock {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  opacity: 0.35;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.hud-dock:hover,
.hud-dock:focus-within {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

.hud-pill {
  display: flex;
  align-items: center;
  background: rgba(35, 28, 47, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  padding: 0.4rem 0.75rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  gap: 0.35rem;
}

.hud-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 9999px;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.hud-btn svg {
  width: 15px;
  height: 15px;
}

.hud-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}

.hud-divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 0.1rem;
}

/* Utilities */
.hidden {
  display: none !important;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .hero-title {
    font-size: 2.75rem;
  }
  
  .hud-dock {
    bottom: 1rem;
    width: 90%;
    max-width: 340px;
  }
  
  .hud-pill {
    justify-content: space-around;
    width: 100%;
  }

  .hud-btn span {
    font-size: 0.75rem;
  }
}
