:root {
  --main-bg: #f4f6fa;
  --sidebar-bg: #1f2937;
  --accent: #3b82f6;
  --text-dark: #1f2937;
  --text-light: #f3f4f6;
  --separator-color: #e5e7eb;
}

@keyframes slideInSidebar {
  0% {
    width: 150px;
    opacity: 1;
  }
  100% {
    width:100px;
    opacity: 1;
  }
}

@keyframes fadeOutTitle {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}


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

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: var(--main-bg);
  color: var(--text-dark);
}

.layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar (collapsed by default) */
.sidebar {
  width: 100px;
  background-color: var(--sidebar-bg);
  color: var(--text-light);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: width 0.3s ease;
  overflow: hidden;
  padding: 1rem 0.5rem;
  position: relative;
}

.sidebar:hover {
  width: 240px;
  padding-left: 1rem;
}

.sidebar h1 {
  font-size: 1.4rem;
  margin-bottom: 0.1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar:hover h1 {
  opacity: 1;
}

.sidebar nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  padding-left: 0;
  margin: 2rem 0;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-light);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
}

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

.sidebar nav .icon {
  width: 30px;
  height: 30px;
  stroke: var(--text-light);
  transition: stroke 0.2s ease;
  flex-shrink: 0;
}

.sidebar nav a:hover .icon,
.sidebar nav a.active .icon {
  stroke: var(--accent);
}

.sidebar nav .label {
  opacity: 0;
  transition: opacity 0.3s ease;
  white-space: nowrap;
}

.sidebar:hover nav .label {
  opacity: 1;
}

.sidebar-separator {
  border: none;
  border-top: 1px solid var(--separator-color);
  margin-top: auto;
  opacity: 0.2;
  width: 40%; /* small width when collapsed */
    transition: width 0.3s ease;
}

.sidebar:hover .sidebar-separator{
  padding-right: 1rem;
  width: 100%; /* small width when collapsed */
}

/* Visit counter */
.visit-count {
  font-size: 0.85rem;
  color: #cbd5e1;
  opacity: 0;
  transition: opacity 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar:hover .visit-count {
  opacity: 1;
}

/* Main content area */
.content {
  flex: 1;
  padding: 1rem;
}

.content h2 {
  margin-top: 1rem;
  color: var(--accent);
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.3rem;
}

.content ul {
  padding-left: 1.5rem;
  margin-top: 0.5rem;
}

.content section {
  margin-bottom: 2rem;
}

.side-by-side {
  display: flex;
  gap: 2rem;
  margin-left: 2rem;
  flex-wrap: wrap;
}

.block {
  flex: 1;
  min-width: 200px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.tag {
  background-color: #e0e7ff;
  color: #1e3a8a;
  font-size: 0.9rem;
  padding: 0.4rem 0.8rem;
  border-radius: 9999px;
  font-weight: 500;
  white-space: nowrap;
}


.profile-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 2rem;
  margin-left: -50px;
  max-width: fit-content;
  background-color: var(--sidebar-bg);
  color: var(--text-light);
  position: relative;
  border: 2px solid #000; box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 0; /* so sidebar can overlay it */
}

.profile-pic {
  width: 150px;
  height: 130px;
  border-radius: 9999px;
  object-fit: cover;
  box-shadow: 0 0 0 2px white;
}

.profile-info h1 {
  font-size: 2rem;
  margin-bottom: 0.2rem;
}

.profile-info p {
  font-size: 0.85rem;
  line-height: 1.2;
}

.profile-info a {
  color: var(--accent);
  text-decoration: none;
}

.profile-info a:hover {
  text-decoration: underline;
}




/* Responsive layout */
@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }

  .top-container {
    flex-direction: column;
    align-items: center;
  }

  .sidebar {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    z-index: 1;
  }

  .sidebar:hover {
    width: 100%;
    align-items: center;
    padding-left: 0.5rem;
  }

  .sidebar h1,
  .sidebar:hover h1 {
    opacity: 1;
  }

  .sidebar nav ul {
    flex-direction: row;
    gap: 1rem;
    justify-content: center;
    width: auto;
  }

  .sidebar nav a {
    opacity: 1;
    transform: none;
  }

  .visit-counter {
    opacity: 1;
  }
}


.top-container {
  display: flex;
}


.language-switcher {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.lang-btn {
  background-color: var(--text-dark);
  color: var(--text-light);
  border: solid 1px var(--text-light);
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;

}

.lang-btn:hover {
  background-color: #2563eb; /* darker blue for hover */
}