/* Professional Portfolio Design System */
:root {
  --bg-dark: #050507;
  --bg-sidebar: #0a0a0c;
  --bg-card: rgba(255, 255, 255, 0.02);
  --bg-card-hover: rgba(255, 255, 255, 0.04);
  --border-color: rgba(255, 255, 255, 0.06);
  --accent-primary: #00d1ff;
  --accent-secondary: #7e3ff2;
  --accent-soft: rgba(0, 209, 255, 0.1);
  --text-main: #fcfcfd;
  --text-muted: #9494a3;
  --sidebar-width: 280px;
  --card-radius: 20px;
  --font-main: 'Inter', sans-serif;
  --font-heading: 'Space Grotesk', sans-serif;
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #050507;
  background-image: 
    radial-gradient(circle at 0% 0%, rgba(126, 63, 242, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 100% 100%, rgba(0, 209, 255, 0.04) 0%, transparent 40%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-main);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  position: fixed;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 40px 24px;
  z-index: 1000;
}

.sidebar-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 60px;
  color: var(--text-main);
  letter-spacing: -1px;
}

.nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text-muted);
  border-radius: 12px;
  transition: var(--transition);
}

.nav-text {
  display: flex;
  flex-direction: column;
}

.nav-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-desc {
  font-size: 0.7rem;
  opacity: 0.7;
  margin-top: 3px;
  font-weight: 400;
}

.nav-item.active a,
.nav-item a:hover {
  background: var(--bg-card-hover);
  color: var(--accent-primary);
}

.nav-item.active a {
  background: var(--accent-soft);
  color: var(--accent-primary);
  border: 1px solid rgba(0, 209, 255, 0.1);
}

/* Main Content */
.dashboard-main {
  margin-left: var(--sidebar-width);
  flex-grow: 1;
  padding: 60px 80px;
  max-width: 1600px;
  width: calc(100% - var(--sidebar-width));
}

.dashboard-header {
  margin-bottom: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.welcome-text h1 {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -1.5px;
  background: linear-gradient(to right, #fff, #a1a1aa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.welcome-text p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
  }
}

/* Grid System */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

/* Widgets Base */
.widget {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  padding: 32px;
  transition: var(--transition);
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

.widget:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: var(--bg-card-hover);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.widget-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.widget-title i {
  color: var(--accent-primary);
}

/* Hero Widget Specific */
.hero-widget {
  grid-column: span 8;
  display: flex;
  align-items: center;
  gap: 40px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(0, 209, 255, 0.02));
}

.hero-avatar {
  width: 160px;
  height: 160px;
  border-radius: 32px;
  object-fit: cover;
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  margin-bottom: 8px;
  color: #fff;
}

.hero-tag {
  color: var(--accent-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  font-size: 0.85rem;
  margin-bottom: 20px;
  display: block;
}

.hero-description {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 540px;
}

/* Tech Stack Mini */
.stack-widget {
  grid-column: span 4;
}

.skills-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.skill-pill {
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: var(--transition);
}

.skill-pill:hover {
  background: var(--accent-soft);
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}

/* Project List Mini */
.projects-widget {
  grid-column: span 6;
}

.work-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  margin-bottom: 12px;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
}

.work-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-color);
  transform: translateX(5px);
}

.work-item strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 4px;
}

.work-item span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Stats/Certs Widget */
.certs-widget {
  grid-column: span 3;
  text-align: center;
}

.certs-count {
  font-size: 3.5rem;
  font-weight: 700;
  font-family: var(--font-heading);
  margin: 10px 0;
  color: #fff;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
}

.btn.primary {
  background: var(--accent-primary);
  color: #000;
}

.btn.primary:hover {
  background: #fff;
  transform: translateY(-2px);
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

/* Animations */
.status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
  padding: 6px 12px;
  border-radius: 20px;
}

.pulse {
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 12px #4ade80;
}

/* Responsive */
@media (max-width: 1200px) {
  .dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .hero-widget, .stack-widget, .projects-widget, .certs-widget {
    grid-column: auto;
    width: 100%;
  }
  .dashboard-main {
    padding: 30px;
  }
}

/* Base styles for Bottom Nav (Desktop Default: hidden) */
@media (min-width: 769px) {
  .bottom-nav { display: none; }
}

/* Mobile App Experience */
@media (max-width: 768px) {
  /* Disable selection for text outside interactable areas to mimic app feeling */
  body {
    -webkit-user-select: none;
    user-select: none;
  }
  .app-container {
    flex-direction: column;
  }

  /* Hide Sidebar completely */
  .sidebar { 
    display: none; 
  }
  
  /* Reset Main Content stretch, add space for bottom nav */
  .dashboard-main {
    margin-left: 0;
    width: 100vw;
    max-width: 100%;
    padding: 15px;
    padding-bottom: 90px; /* Space for bottom nav */
    padding-top: 30px;
    height: auto;
    overflow-x: hidden;
  }

  /* Smaller widget padding */
  .widget { padding: 20px; }

  /* Hide scrollbars for app feel */
  ::-webkit-scrollbar { display: none; }
  * { -webkit-overflow-scrolling: touch; }

  /* Welcome text smaller on mobile */
  .welcome-text h1 { font-size: 2rem; }

  /* Refactor Bento modules to scale nicely */
  .hero-avatar {
    width: 110px;
    height: 110px;
    border-radius: 20px;
  }
  
  .hero-widget {
    flex-direction: column;
    text-align: center;
    gap: 15px;
    padding: 30px 20px;
  }

  .hero-info h2 { font-size: 1.8rem; }
  .hero-description { font-size: 1rem; line-height: 1.6; }

  /* Bottom Navigation Bar */
  .bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 75px;
    background: rgba(10, 10, 12, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-top: 1px solid var(--border-color);
    z-index: 9999; /* Ensure it stays above EVERYTHING */
    padding: 0 10px;
    padding-bottom: env(safe-area-inset-bottom, 5px);
  }
  
  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.75rem; /* Slightly larger */
    font-weight: 500;
    flex: 1;
    height: 100%;
    transition: var(--transition);
    user-select: auto;
    -webkit-user-select: auto;
    -webkit-tap-highlight-color: transparent;
  }
  
  .bottom-nav-item i {
    font-size: 1.4rem; /* Larger touch targets */
    margin-bottom: 6px;
    transition: transform 0.2s ease;
  }
  
  .bottom-nav-item.active {
    color: var(--accent-primary);
  }
  
  .bottom-nav-item.active i {
    transform: translateY(-2px);
  }
}
