:root {
  --bg-color: #0D0D0D;
  --text-color: #F3F4F6;
  --accent-color: #7C3AED;
  --accent-hover: #6D28D9;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --font-main: 'Inter', sans-serif;
  --transition-speed: 0.3s;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh; /* fallback */
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Typography */
h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  flex: 1; /* Push footer down */
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 100px; /* Space for control bar */
}

/* Control Bar */
.control-bar {
  position: fixed;
  bottom: 20px;
  left: 150px;
  right: 150px;
  width: auto;
  max-width: none;
  height: 80px;
  background: #1E1E1E; /* Solid/Dark background like chat UI */
  background: rgba(30, 30, 30, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  z-index: 100;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}

.bar-left, .bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.bar-center {
  flex: 1;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

/* Home/Back Icon Styles */
.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--text-color);
  transition: background 0.3s, color 0.3s;
}

.nav-icon:hover {
  background: rgba(255,255,255,0.1);
  color: var(--accent-color);
}

/* Updates to existing components for bar */
.back-btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--text-color);
  transition: background 0.3s;
}

.back-btn-icon:hover {
  background: rgba(255,255,255,0.1);
  color: var(--accent-color);
}

/* Team Lead in Bar */
.team-lead-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px;
  border-radius: 20px;
  transition: background 0.2s;
}

.team-lead-inline:hover {
  background: rgba(255,255,255,0.05);
}

.team-lead-mini {
  display: flex;
  align-items: center;
  gap: 10px;
}

.team-lead-mini img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #2a2a2a; /* Contrast border */
}

.team-lead-info {
  display: flex;
  flex-direction: column;
  font-size: 0.8rem;
  line-height: 1.2;
}

.bot-link-mini {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  font-size: 1.2rem;
  transition: transform 0.2s;
}

.bot-link-mini:hover {
  transform: scale(1.1);
  background: var(--accent-color);
}


.fade-in {
  animation: fadeIn var(--transition-speed) ease-out;
}

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

/* Glassmorphism Card */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 24px;
  transition: transform var(--transition-speed), border-color var(--transition-speed);
}

.glass-card:hover {
  border-color: var(--accent-color);
  transform: translateY(-5px);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background-color: var(--accent-color);
  color: white;
  border-radius: 8px;
  font-weight: 600;
  transition: background-color var(--transition-speed);
  border: none;
  cursor: pointer;
}

.btn:hover {
  background-color: var(--accent-hover);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
}

.btn-outline:hover {
  background-color: rgba(124, 58, 237, 0.1);
}

.back-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 10;
}

/* Language Switcher Dropdown */
.lang-dropdown {
  position: relative;
}

.lang-toggle {
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--glass-border);
  color: var(--text-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
  transition: background 0.3s;
}

.lang-toggle:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
}

.lang-menu {
  position: absolute;
  bottom: 120%; /* Show above button */
  right: 0;
  background: #1a1a1a;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.lang-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  background: transparent;
  border: none;
  color: var(--text-color);
  padding: 8px 12px;
  text-align: left;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.lang-option:hover, .lang-option.active {
  background: rgba(255,255,255,0.1);
}

.lang-option.active {
  color: var(--accent-color);
}

/* Layout Specifics */

/* Index Page */
.hero {
  text-align: center;
  margin-bottom: 40px;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 16px;
  background: linear-gradient(to right, #fff, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.member-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.member-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 16px;
  border: 2px solid var(--accent-color);
  background-color: #333;
}

/* Member Page */
.profile-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  align-items: center;
}

.profile-photo {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 20px;
  object-fit: cover;
  border: 2px solid var(--accent-color);
}

.profile-info h2 {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.profile-role {
  color: var(--accent-color);
  font-size: 1.2rem;
  margin-bottom: 24px;
}

.profile-bio {
  margin-bottom: 32px;
  line-height: 1.6;
  opacity: 0.9;
}

.profile-contacts {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}

/* Portfolio Page */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  overflow-y: auto; /* Allow scroll within grid if needed, but page is fixed */
  max-height: 70vh;
  padding-right: 10px;
}

/* Scrollbar for portfolio grid */
.portfolio-grid::-webkit-scrollbar {
  width: 6px;
}
.portfolio-grid::-webkit-scrollbar-track {
  background: transparent;
}
.portfolio-grid::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 3px;
}

.project-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 16px;
  background-color: #333;
}

/* Team Lead Badge/Footer */
.team-lead-footer {
  position: absolute;
  bottom: 20px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 20px;
  align-items: center;
  padding: 0 20px;
}

.team-lead-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  border-radius: 50px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
}

.team-lead-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.bot-link {
  color: var(--accent-color);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Responsive */
@media (max-width: 768px) {
  body {
    overflow-y: auto;
    height: auto;
  }

  .container {
    height: auto;
    padding: 20px 20px 100px;
    display: block; 
  }
  
  /* Make control bar strictly single row on mobile */
  .control-bar {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: calc(100% - 24px); /* Slightly tighter on mobile */
    max-width: 600px;
    bottom: 12px;
    height: 60px;
    padding: 0 4px;
    border-radius: 30px;
  }

  .bar-left, .bar-right {
    flex: 0 0 auto;
    gap: 4px;
  }
  
  .bar-center {
    flex: 1;
    overflow: hidden;
  }

  /* Simplify Team Lead on mobile */
  .team-lead-inline {
    gap: 8px;
    padding: 0;
  }
  
  .team-lead-info {
    display: flex;
    flex-direction: column;
    max-width: 100px;
  }

  .team-lead-info span:first-child {
    display: none; /* Hide "Team Lead" label to save space */
  }

  .team-lead-info span:last-child {
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .bot-link-mini {
    width: 32px;
    height: 32px;
    font-size: 1rem;
    background: transparent;
  }

  .hero h1 {
    font-size: 2.5rem;
  }
  
  .current-page-label {
    display: none;
  }
  
  .team-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  
  .profile-layout {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 20px;
    display: flex;
    flex-direction: column;
  }
  
  .profile-photo {
    width: 150px;
    margin: 0 auto;
  }
  
  .profile-contacts {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .portfolio-grid {
    max-height: none; /* Let it expand */
    overflow-y: visible;
  }
}
