:root {
  --bg-main: #000000;
  --bg-sidebar: #0a0f1a;
  --bg-card: #111827;
  --accent: #27d494;
  --accent-hover: #1fb981;
  --border: #1f2937;
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --font-main: 'Inter', sans-serif;
  --sidebar-width: 320px;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: #374151; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-main);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* App Layout - Web App Style */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* --- SIDEBAR --- */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.sidebar-header {
  padding: 30px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 15px;
}

.brand-logo {
  width: 85px; 
  height: 85px; 
  border-radius: 6px;
  object-fit: cover;
  border: none;
  margin-bottom: 5px; 
}

.brand-title h1 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.5px;
}

.brand-title h1 span {
  color: var(--accent);
}

.brand-title p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin: 5px 0 0 0;
}

.project-list {
  flex: 1;
  overflow-y: auto;
  padding: 20px 0;
}

.project-item {
  padding: 15px 25px;
  border-bottom: 1px solid rgba(31, 41, 55, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-left: 4px solid transparent;
}

.project-item:hover {
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.project-item.active {
  background-color: rgba(39, 212, 148, 0.08);
  color: var(--accent);
  border-left-color: var(--accent);
}

.project-item i {
  font-size: 0.8rem;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}

.project-item.active i, .project-item:hover i {
  opacity: 1;
  transform: translateX(0);
}

/* --- MAIN CONTENT --- */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.content-wrapper {
  padding: 50px;
  flex: 1;
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.project-image {

  width: auto;
  height: auto;
  

  max-width: 100%;
  

  object-fit: contain; 
  
  border-radius: 16px;
  border: 1px solid var(--border);
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  

  display: block;
  margin-left: auto;
  margin-right: auto;
}

.project-title {
  font-size: 2.8rem;
  font-weight: 800;
  margin-top: 0;
  margin-bottom: 20px;
}

/* Tech Stack with Icons */
.tech-stack {
  display: flex;
  gap: 12px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.tech-tag {
  background-color: var(--bg-card);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.project-desc {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 1.1rem;
  margin-bottom: 40px;
}


.project-desc a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed var(--accent);
  transition: all 0.3s ease;
}

.project-desc a:hover {
  color: var(--accent-hover);
  border-bottom-style: solid;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: var(--accent);
  color: #000;
  padding: 14px 32px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
}

.project-link:hover {
  background-color: var(--accent-hover);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(39, 212, 148, 0.2);
}

/* Footer */
.footer {
  text-align: center;
  padding: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.9rem;
  background-color: var(--bg-main);
}

/*Tailwind Color Utilities*/
.text-yellow-400 { color: #facc15; }
.text-green-500 { color: #22c55e; }
.text-blue-400 { color: #60a5fa; }
.text-blue-500 { color: #3b82f6; }
.text-blue-600 { color: #2563eb; }
.text-orange-500 { color: #f97316; }
.text-red-400 { color: #f87171; }
.text-red-500 { color: #ef4444; }
.text-white { color: #ffffff; }
.text-purple-400 { color: #c084fc; }
.text-cyan-400 { color: #22d3ee; }
.text-cyan-500 { color: #06b6d4; }
.text-gray-300 { color: #d1d5db; }

/* Mobile Responsive */
@media (max-width: 850px) {
  .app-layout {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    position: relative;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .project-list {
    display: flex;
    overflow-x: auto;
    padding: 10px;
    gap: 10px;
  }

  .project-item {
    white-space: nowrap;
    border-left: none;
    border-bottom: 2px solid transparent;
    padding: 10px 20px;
    border-radius: 8px;
    background-color: var(--bg-card);
  }

  .project-item.active {
    border-left: none;
    border-bottom: none;
    background-color: rgba(39, 212, 148, 0.15);
  }

  .project-item i { display: none; } 

  .main-content {
    margin-left: 0;
  }

  .content-wrapper {
    padding: 25px 20px;
  }

 

  .project-title {
    font-size: 2rem;
  }
}

/* Back Button Styles */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 20px;
  transition: all 0.3s ease;
  width: fit-content;
}

.back-btn:hover {
  color: var(--accent);
  transform: translateX(-5px); 
}

.sidebar-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;

}

/* Back Icon Button Styling */
.back-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: #161b22; 
    color: #4ade80; 
    border-radius: 50%; 
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    border: 1px solid #30363d;
    margin-bottom: 30px; 
}


.back-icon-btn:hover {
    background-color: #4ade80;
    color: #05070a; /* Background එකේ කළු පාට */
    transform: translateX(-5px); /* වමට පොඩ්ඩක් මූව් වෙනවා */
    box-shadow: 0 0 15px rgba(74, 222, 128, 0.3);
}
