/* ========================================
   CSS Variables & Base Styles
   ======================================== */
:root {
  --glass-bg: rgba(255, 255, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-shadow: rgba(0, 0, 0, 0.1);
  --glass-blur: 20px;
  --text-primary: rgba(255, 255, 255, 0.95);
  --text-secondary: rgba(255, 255, 255, 0.7);
  --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --dock-height: 90px;
  --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: var(--text-primary);
  min-height: 100vh;
  position: relative;
}

/* ========================================
   Animated Background
   ======================================== */
.background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  animation: float 20s ease-in-out infinite;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  top: -100px;
  left: -100px;
  animation-delay: 0s;
}

.orb-2 {
  width: 350px;
  height: 350px;
  background: linear-gradient(135deg, #f093fb, #f5576c);
  top: 50%;
  right: -150px;
  animation-delay: -5s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  bottom: -100px;
  left: 30%;
  animation-delay: -10s;
}

.orb-4 {
  width: 250px;
  height: 250px;
  background: linear-gradient(135deg, #43e97b, #38f9d7);
  top: 30%;
  left: 50%;
  animation-delay: -15s;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  25% {
    transform: translate(50px, -50px) scale(1.1);
  }

  50% {
    transform: translate(-30px, 30px) scale(0.95);
  }

  75% {
    transform: translate(-50px, -30px) scale(1.05);
  }
}

/* ========================================
   Content Area - Desktop
   ======================================== */
.content-area {
  position: relative;
  z-index: 1;
  height: calc(100vh - var(--dock-height) - 40px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  overflow-y: auto;
}

.nav-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  align-items: center;
  max-width: 900px;
}

/* ========================================
   Navigation Cards - Desktop
   ======================================== */
.nav-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 28px 36px;
  text-decoration: none;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 160px;
  transition: all 0.4s var(--transition-smooth);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.nav-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s var(--transition-smooth);
}

.nav-card:hover {
  transform: translateY(-12px) scale(1.05);
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.3),
    0 0 60px rgba(102, 126, 234, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.nav-card:hover::before {
  opacity: 1;
}

.nav-card-name {
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  position: relative;
  z-index: 1;
}

.nav-card-desc {
  display: none;
}

.nav-card-initials {
  display: none;
}

/* ========================================
   Dock - Desktop
   ======================================== */
.dock-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  max-width: calc(100vw - 40px);
}

.dock {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.dock::-webkit-scrollbar {
  display: none;
}

.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s var(--transition-smooth);
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
}

.dock-item::before {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s var(--transition-smooth);
}

.dock-item.active::before {
  transform: translateX(-50%) scale(1);
}

.dock-item:hover {
  transform: translateY(-8px) scale(1.15);
}

.dock-item.active {
  background: rgba(255, 255, 255, 0.2);
}

.dock-icon {
  font-size: 32px;
  line-height: 1;
  transition: transform 0.3s var(--transition-smooth);
}

.dock-item:hover .dock-icon {
  transform: scale(1.1);
}

.dock-label {
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0;
  transform: translateY(5px);
  transition: all 0.3s var(--transition-smooth);
}

.dock-item:hover .dock-label,
.dock-item.active .dock-label {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   Mobile Styles
   ======================================== */
@media (max-width: 768px) {
  :root {
    --dock-height: 80px;
  }

  .content-area {
    height: calc(100vh - var(--dock-height) - 20px);
    padding: 20px;
    align-items: flex-start;
    padding-top: 40px;
  }

  .nav-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 100%;
  }

  /* Metro UI Style Cards for Mobile */
  .nav-card {
    aspect-ratio: 1;
    min-width: unset;
    width: 100%;
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.2);
    justify-content: space-between;
    align-items: center;
    position: relative;
  }

  /* Large initials display */
  .nav-card-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    font-size: 42px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }

  /* Full name at bottom */
  .nav-card-name {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.9;
    text-align: center;
    line-height: 1.3;
    max-height: 32px;
    overflow: hidden;
  }

  .nav-card:hover {
    transform: none;
  }

  .nav-card:active {
    transform: scale(0.96);
    background: rgba(255, 255, 255, 0.3);
  }

  /* Mobile Dock */
  .dock-container {
    bottom: 10px;
    left: 10px;
    right: 10px;
    transform: none;
    max-width: none;
  }

  .dock {
    padding: 8px 12px;
    gap: 4px;
    border-radius: 18px;
    justify-content: flex-start;
  }

  .dock-item {
    padding: 6px 12px;
    border-radius: 12px;
  }

  .dock-icon {
    font-size: 24px;
  }

  .dock-label {
    font-size: 10px;
    opacity: 1;
    transform: none;
  }

  .dock-item:hover {
    transform: none;
  }

  .dock-item:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.25);
  }
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-card {
  animation: fadeInUp 0.5s var(--transition-smooth) backwards;
}

.nav-card:nth-child(1) {
  animation-delay: 0.05s;
}

.nav-card:nth-child(2) {
  animation-delay: 0.1s;
}

.nav-card:nth-child(3) {
  animation-delay: 0.15s;
}

.nav-card:nth-child(4) {
  animation-delay: 0.2s;
}

.nav-card:nth-child(5) {
  animation-delay: 0.25s;
}

.nav-card:nth-child(6) {
  animation-delay: 0.3s;
}

.nav-card:nth-child(7) {
  animation-delay: 0.35s;
}

.nav-card:nth-child(8) {
  animation-delay: 0.4s;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .orb {
    animation: none;
  }

  .nav-card,
  .dock-item {
    transition-duration: 0.1s;
    animation: none;
  }
}