body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  background-color: var(--header-bg);
  color: var(--text-color);
  line-height: 1.6;
}

main {
  background: var(--bg-gradient);
}

.d-none {
  display: none;
}

.container {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 25px 20px;
}

.container.content {
  min-height: 60vh;
}

.site-header {
  position: relative;
  background: var(--header-bg);
  padding: 1rem 0;
  color: var(--header-text);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.user {
  margin: 0;
  font-weight: 700;
  font-size: 1.75rem;
  letter-spacing: 1.2px;
}

.header-flex {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}

.user-nav-section {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.user-nav-content {
  display: flex;
  flex-direction: column;
}

.profile-pic {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  border: .1rem solid var(--header-text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.profile-link {
  display: inline-block;
  text-decoration: none;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.profile-link:hover .profile-pic {
  transform: scale(1.05);
  opacity: 0.9;
}

.profile-link:hover {
  transform: translateY(-2px);
}

.nav {
  margin-top: 12px;
}

.nav a {
  color: var(--nav-link);
  text-decoration: none;
  margin-right: 2rem;
  font-weight: 700;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav a.selected {
  border-bottom: .125rem solid var(--nav-selected);
  color: var(--nav-selected);
}

.nav a:hover {
  color: var(--nav-link-hover) !important;
  border-bottom: .125rem solid var(--nav-link-hover);
}

a.link {
  color: var(--text-color) !important;
  font-weight: bold;
  text-decoration: none;
  border-bottom: .125rem solid var(--nav-link);
  transition: color 0.2s ease, border-color 0.2s ease;
}

a.link:hover {
  color: var(--nav-selected) !important;
  border-color: var(--nav-selected);
}

h2 {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  color: var(--card-heading);
}

.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 500;
  letter-spacing: 0.05em;
  user-select: none;
}

#theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--header-text);
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-icon {
  transition: transform 0.2s ease, filter 0.2s ease;
  filter: brightness(0) saturate(100%) invert(1);
  width: 1.5rem;
  height: 1.5rem;
}

#theme-toggle:hover .theme-icon {
  transform: scale(1.2);
  filter: brightness(0) saturate(100%) invert(0.5) sepia(1) saturate(5) hue-rotate(200deg);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .container {
    padding: 15px 15px;
  }

  .header-flex {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .user-nav-section {
    width: 100%;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
  }

  .user-nav-content {
    align-items: center;
  }

  .user {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }

  .profile-pic {
    width: 4rem;
    height: 4rem;
  }

  .nav {
    margin-top: 0.5rem;
  }

  .nav a {
    margin-right: 1rem;
    font-size: 0.9rem;
  }

  #theme-toggle {
    align-self: flex-end;
    position: absolute;
    top: 1rem;
    right: 1rem;
  }
}

@media (max-width: 480px) {
  .user {
    font-size: 1.3rem;
  }

  .profile-pic {
    width: 3.5rem;
    height: 3.5rem;
  }

  .nav a {
    margin-right: 0.75rem;
    font-size: 0.85rem;
  }

  .container {
    padding: 10px 10px;
  }

  .nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  .nav a {
    margin-right: 0;
  }
}